#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
using namespace std;
const long double MY_PI = acosl(-1);
long double f(int x1, int x2) {
  if (abs(x1 - x2) > 1) return MY_PI;
  if (x1 == 0 && x2 == 0) return 0;
  return MY_PI - 2 * atan2l(1, max(x1, x2));
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, d;
  cin >> n >> d;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> L = {(int)-1e9, (int)-1e9};
  vector<int> R;
  for (int i = 0; i < n; i++) R.push_back(a[i]);
  int id = 0;
  int m;
  cin >> m;
  while (m--) {
    int x;
    cin >> x;
    while (id < R.size() && R[id] < x) {
      L.push_back(R[id]);
      id++;
    }
    long double ans = MY_PI;
    if (id < R.size()) {
      ans = min(ans, MY_PI - atan2l(1, R[id] - x));
    }
    if (L.size() >= 3) {
      ans = min(ans, MY_PI - atan2l(1, x - L.back() - 1));
    }
    if (!L.empty() && id < R.size()) {
      int i = L.size() - 1;
      for (int c = id; c < R.size(); c++) {
        int x1 = R[c];
        int x2 = x1 - x;
        if (x2 > 2 * d + 3) break;
        while (x - L[i] < x2) {
          if (x - L[i] > 2 * d + 3) break;
          i--;
        }
        if (abs(x2 - (x - L[i] - 1)) <= 1) {
          ans = min(ans, f(x2, x - L[i] - 1));
          break;
        }
        if (x2 - (x - L[i - 1] - 1) == -1) {
          ans = min(ans, f(x2, x - L[i - 1] - 1));
          break;
        }
      }
    }
    ans = MY_PI - ans;
    cout << fixed << setprecision(30) << ans << "\n";
  }
}
