#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000 * 7001 + 157;
const double PI = acos(-1);
const int MAGIC = 31;
vector<int> a;
int wt[MAXN / 32];
void setbit(int idx) { wt[idx >> 5] |= (1 << (idx & MAGIC)); }
int is(int idx) { return wt[idx >> 5] & (1 << (idx & MAGIC)); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, d;
  cin >> n >> d;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    setbit(a[i]);
    setbit(a[i] + 1);
  }
  int m;
  cin >> m;
  int idx = 0;
  while (m--) {
    int x;
    cin >> x;
    double ans = 0;
    while (idx < a.size() && a[idx] < x) idx++;
    int cnt = 0;
    int mn = INT_MAX;
    if (idx < a.size()) {
      ans = max(ans, atan2(1, a[idx] - x));
      if (a[idx] == x) cnt++;
      mn = min(mn, a[idx] - x);
    }
    if (idx - 1 >= 0) {
      ans = max(ans, atan2(1, x - a[idx - 1] - 1));
      if (a[idx - 1] == x - 1) cnt++;
      mn = min(mn, x - a[idx - 1] - 1);
    }
    if (cnt == 2)
      ans = PI;
    else if (cnt == 0) {
      int l = idx - 1;
      for (; l >= 0; l--) {
        int i = x - a[l] - 1;
        if (x + i > 1 + a.back()) break;
        if (i > mn + mn) break;
        if (is(x + i)) {
          ans = max(ans, 2 * atan2(1, i));
          break;
        }
        i++;
        if (is(x + i)) {
          ans = max(ans, 2 * atan2(1, i));
          break;
        }
      }
    }
    cout << fixed << setprecision(12) << ans << "\n";
  }
  return 0;
}
