#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int n, d;
int a[200005];
int m;
int x;
double t[7777];
int main() {
  for (int i = 1; i <= 7000; i++) {
    t[i] = atan(1.0 / i);
  }
  scanf("%d%d", &n, &d);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  scanf("%d", &m);
  int id = 0;
  while (m--) {
    scanf("%d", &x);
    while (id < n && a[id + 1] < x) id++;
    if (a[id] == x - 1) {
      if (a[id + 1] == x)
        printf("%.11f\n", pi);
      else
        printf("%.11f\n", pi / 2);
    } else if (a[id + 1] == x) {
      printf("%.11f\n", pi / 2);
    } else {
      double ans = 0;
      if (id != n) ans = max(ans, t[a[id + 1] - x]);
      if (id != 0) ans = max(ans, t[x - a[id] - 1]);
      int l = id, r = id + 1;
      while (l >= 1 && r <= n) {
        int dl = x - a[l] - 1, dr = a[r] - x;
        if (dl >= 7000 || dr >= 7000) break;
        double tmp = t[max(dl, dr)] * 2;
        if (dl + 1 == dr || dl == dr || dl == dr + 1) {
          ans = max(ans, tmp);
          break;
        }
        if (dl < dr)
          l--;
        else
          r++;
      }
      printf("%.11f\n", ans);
    }
  }
}
