#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
void init_io() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main() {
  init_io();
  cout << fixed << setprecision(15);
  int n, d;
  cin >> n >> d;
  vector<int> a(n, 0);
  for (int i = 0; i < n; ++i) cin >> a[i];
  int m;
  cin >> m;
  vector<int> x(m, 0);
  for (int i = 0; i < m; ++i) cin >> x[i];
  int ia = 0;
  for (int i = 0; i < m; ++i) {
    while (ia < n && a[ia] < x[i]) ++ia;
    int dis = INF;
    if (ia > 0) dis = min(dis, x[i] - a[ia - 1] - 1);
    if (ia < n) dis = min(dis, a[ia] - x[i]);
    double ans = atan2(1, dis);
    int il = ia - 1, ir = ia;
    while (il >= 0 && ir < n) {
      int ldis = x[i] - a[il] - 1, rdis = a[ir] - x[i];
      if (abs(ldis - rdis) <= 1) {
        ans = max(ans, 2 * atan2(1, max(ldis, rdis)));
        break;
      }
      if (max(ldis, rdis) > d + 10) break;
      if (ldis < rdis)
        --il;
      else
        ++ir;
    }
    cout << ans << "\n";
  }
}
