#include <bits/stdc++.h>
using namespace std;
const int NN = 200020;
int a[NN];
int b[NN];
int main() {
  cout << fixed << setprecision(15);
  int n, d, i, j, k, L, R;
  scanf("%d%d", &n, &d);
  for (i = 1; i <= n; i++) {
    scanf("%d", a + i);
    b[i] = a[i] + 1;
  }
  int test, x, lft, rgt;
  scanf("%d", &test);
  long double ans;
  while (test--) {
    scanf("%d", &x);
    R = lower_bound(a + 1, a + n + 1, x) - a;
    if (R == 1 || R == n + 1) {
      puts("1.570796326794897");
      continue;
    }
    L = R - 1;
    lft = x - b[L];
    rgt = a[R] - x;
    if (!rgt && !lft) {
      puts("3.141592653589793");
      continue;
    }
    if (!rgt || !lft) {
      puts("1.570796326794897");
      continue;
    }
    if (abs(lft - rgt) <= 1) {
      ans = 2 * atan2l((long double)1, (long double)max(lft, rgt));
      cout << ans << endl;
      continue;
    }
    ans = atan2l((long double)1, (long double)min(lft, rgt));
    lft = (min(lft, rgt) << 1);
    while (R <= n && a[R] - x <= lft) {
      for (; L > 1 && (x - b[L]) < (a[R] - x) - 1; L--)
        ;
      if (abs((a[R] - x) - (x - b[L])) <= 1) {
        ans = max(ans, 2 * atan2l((long double)1, max((a[R] - x), (x - b[L]))));
        break;
      }
      R++;
    }
    cout << ans << endl;
  }
  return 0;
}
