#include <iostream>
#include <algorithm>
using namespace std;

int main() {
	int N, Q;
	cin >> N >> Q; 
	int A[N], B[Q];
	
  	for (int i = 0; i < N; ++i) {
		cin >> A[i];
	}
    	
  	for (int i = 0; i < Q; ++i) {
		cin >> B[i];
	}
		
	sort(A, A + N);

  	if (N % 2 != 0) {
		A[N / 2];
  	}
  	int medijana = (A[(N - 1) / 2] + A[N / 2]) / 2;
  	
	int duzinaNiza = sizeof(A) / sizeof(int);

	int srednjiBr = (N - 1) / 2;
	
	int strane = (N - 1) / 2;

	int broj = 0;

	int noviNiz[N];

	for (int i = srednjiBr - strane; i <= srednjiBr + strane; ++i) {
		noviNiz[broj++] = A[i];
	}
	
	if (duzinaNiza % 2 != 0) {
		medijana + 1;
	}
	
	for (int i = 0; i < Q; ++i) {
		int x = B[i] - medijana;
		cout << x << endl;
	}
	
	return 0;
}