#include <bits/stdc++.h>
using namespace std;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const long double EPS = 1e-10;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
inline long double easy(long double x) { return atan2(1, x); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  int n, d;
  cin >> n >> d;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  const int cap = 3500;
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    int* r = lower_bound(a, a + n, x);
    if (r == a) {
      cout << easy(*r - x) << nl;
    } else if (r == a + n) {
      cout << easy(x - (*(r - 1) + 1)) << nl;
    } else {
      int* l = r - 1;
      long double ans = easy(min(*r - x, x - (*l + 1)));
      for (int j = 0; j < cap; j++) {
        int left = x - (*l + 1);
        int right = *r - x;
        if (abs(left - right) <= 1) {
          ans = max(ans, 2 * easy(max(left, right)));
          break;
        } else if (left < right) {
          if (l-- == a) break;
        } else {
          if (++r == a + n) break;
        }
      }
      cout << ans << nl;
    }
  }
  return 0;
}
