#include <bits/stdc++.h>
int max(int a, int b) { return a > b ? a : b; }
int main() {
  static int aa[200000];
  int n, d, q, i, h, j;
  scanf("%d%d", &n, &d);
  for (i = 0; i < n; i++) scanf("%d", &aa[i]);
  scanf("%d", &q);
  h = -1;
  while (q--) {
    int x, di, dj, d_;
    double alpha, beta;
    scanf("%d", &x);
    if (x == 0 || x == aa[n - 1] + 1) {
      printf("%.12f\n", (atan(1) * 4) / 2);
      continue;
    }
    while (h + 1 < n && aa[h + 1] < x) h++;
    di = x - (aa[h] + 1);
    dj = aa[h + 1] - x;
    if (di == 0 && dj == 0) {
      printf("%.12f\n", (atan(1) * 4));
      continue;
    } else if (di == 0 || dj == 0) {
      printf("%.12f\n", (atan(1) * 4) / 2);
      continue;
    }
    alpha = atan(1.0 / (di < dj ? di : dj));
    d_ = (int)(1.0 / tan(alpha / 2.0) + 10);
    for (i = h, j = h + 1; i >= 0 && j < n && (di = x - (aa[i] + 1)) < d_ &&
                           (dj = aa[j] - x) < d_;)
      if (di + 1 < dj)
        i--;
      else if (di > dj + 1)
        j++;
      else {
        if (alpha < (beta = atan(1.0 / max(di, dj)) * 2)) alpha = beta;
        break;
      }
    printf("%.12f\n", alpha);
  }
  return 0;
}
