#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int maxn = 2e5 + 9, bl = 7e3 + 9;
int n, d, m, t = 0, a[maxn], s[2 * maxn];
int main() {
  cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(false);
  cin >> n >> d;
  for (int i = (0); i < (n); ++i) cin >> a[i], s[t++] = a[i], s[t++] = a[i] + 1;
  t = unique(s, s + t) - s;
  int* r = s + t;
  cin >> m;
  for (int __ = (0); __ < (m); ++__) {
    int x, c;
    cin >> x, c = upper_bound(a, a + n, x) - lower_bound(a, a + n, x - 1);
    cout << fixed << setprecision(10);
    if (c == 2)
      cout << pi << '\n';
    else if (c == 1)
      cout << pi / 2 << '\n';
    else {
      double res = 0;
      int* p1 = lower_bound(s, s + t, x);
      res = max(res, atan2(1, *p1 - x));
      if (p1 != s) {
        int* p2 = p1 - 1;
        res = max(res, atan2(1, x - *p2));
        while (1) {
          if (*p1 - x > x - *p2) {
            --p2;
            if (p2 == s - 1 || x - *p2 > bl) break;
          } else if (*p1 - x < x - *p2) {
            ++p1;
            if (p1 == r || *p1 - x > bl) break;
          } else {
            res = max(res, 2 * atan2(1, *p1 - x));
            break;
          }
        }
      }
      cout << res << '\n';
    }
  }
}
