#include <bits/stdc++.h>
using namespace std;
long long a[200005];
long long cor[400005];
long long x;
long long it = 0;
long long n, d;
signed main() {
  cin >> n >> d;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    it++;
    cor[it] = a[i];
    it++;
    cor[it] = a[i] + 1;
  }
  cor[it + 1] = 1000000000000000;
  cor[0] = -10000000000000;
  long long m;
  cin >> m;
  long long cur = 0;
  for (long long i = 1; i <= m; i++) {
    cin >> x;
    while (cor[cur] < x) {
      cur++;
    }
    long long cac = cur + 1, cut = cur;
    if (cur % 2 == 1) {
      cut = cur - 1;
      cac = cur;
    } else {
      cut = cur;
      cac = cur + 1;
    }
    long long mdist = min(x - cor[cut], cor[cac] - x);
    long long otherdist = 1000000000;
    while (true) {
      if (x - cor[cut] > 2 * mdist + 1 || cor[cac] - x > 2 * mdist + 1) break;
      if (x - cor[cut] == cor[cac] - x) {
        otherdist = x - cor[cut];
        break;
      } else if (x - cor[cut] > cor[cac] - x) {
        cac++;
      } else {
        cut--;
      }
    }
    double concac1 = sqrt(1 + (double)mdist * (double)mdist);
    concac1 = 1 / concac1;
    double goccac1 = asin(concac1);
    double concac2 = sqrt(1 + (double)otherdist * (double)otherdist);
    concac2 = 1 / concac2;
    double goccac2 = asin(concac2) * 2;
    printf("%.12lf\n", max(goccac2, goccac1));
  }
}
