#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
double PI = acos(-1), ans;
int n, d, m, x, cur, dl, dr, a[N];
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (scanf("%d", &m); m--; printf("%.9lf\n", ans)) {
    for (scanf("%d", &x); cur < n && a[cur + 1] < x;) ++cur;
    if (a[cur] == x - 1 && a[cur + 1] == x)
      ans = PI;
    else if (a[cur] == x - 1 || a[cur + 1] == x)
      ans = PI / 2;
    else {
      ans = 0;
      if (cur) ans = max(ans, atan2(1, dl = x - a[cur] - 1));
      if (cur < n) ans = max(ans, atan2(1, dr = a[cur + 1] - x));
      for (int pl = cur, pr = cur + 1, d = min(dl, dr) * 4 + 20;
           pl && pr <= n && a[pr] - a[pl] <= d; dr < dl ? ++pr : --pl) {
        dl = x - a[pl] - 1, dr = a[pr] - x;
        if (abs(dl - dr) < 2) {
          ans = max(ans, 2 * atan2(1, max(dl, dr)));
          break;
        }
      }
    }
  }
}
