#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int INF = mod * mod;
const double eps = 1e-6;
const double pi = acos(-1.0);
void solve() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int m;
  cin >> m;
  for (int aa = 0; aa < m; aa++) {
    double ans = 0;
    int x;
    cin >> x;
    int id = lower_bound(a.begin(), a.end(), x) - a.begin();
    if (id == n) {
      int dist = x - a[n - 1] - 1;
      if (dist == 0)
        ans = pi / 2.0;
      else
        ans = -atan(-1 / (double)dist);
    } else if (id == 0) {
      int dist = a[0] - x;
      if (dist == 0)
        ans = pi / 2.0;
      else
        ans = -atan(-1 / (double)dist);
    } else {
      int le = id - 1, ri = id;
      if (a[le] + 1 == a[ri] && a[ri] == x) {
        ans = pi;
      } else {
        int dist = a[ri] - x;
        if (dist == 0)
          ans = max(ans, pi / 2.0);
        else
          ans = max(ans, -atan(-1 / (double)dist));
        dist = x - a[le] - 1;
        if (dist == 0)
          ans = max(ans, pi / 2.0);
        else
          ans = max(ans, -atan(-1 / (double)dist));
        double mi = 1 / tan(ans / 2.0);
        mi += eps;
        for (int i = le; i >= 0; i--) {
          int dist = x - a[i] - 1;
          if (dist > mi) break;
          while (ri < n && a[ri] - x < dist - 1) ri++;
          if (ri == n) break;
          int dist2 = a[ri] - x;
          if (dist2 == dist || dist2 - 1 == dist) {
            if (dist2 == 0)
              ans = max(ans, pi / 2.0);
            else
              ans = max(ans, -2 * atan(-1 / (double)dist2));
            break;
          } else if (dist2 + 1 == dist) {
            if (dist == 0)
              ans = max(ans, pi / 2.0);
            else
              ans = max(ans, -2 * atan(-1 / (double)dist));
            break;
          }
        }
      }
    }
    cout << ans << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(10);
  solve();
  return 0;
}
