#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  scanf("%d %d", &n, &d);
  vector<int> v(n);
  for (auto &e : v) scanf("%d ", &e);
  int m;
  scanf("%d", &m);
  int i = 0;
  for (; m--;) {
    int x;
    scanf("%d", &x);
    while (i < n && v[i] + 1 <= x) i++;
    int ml = v[n - 1];
    if (i > 0) ml = min(ml, x - v[i - 1] - 1);
    if (i < n) ml = min(ml, v[i] - x);
    int r = ml;
    long long k = 1;
    for (; k <= x; k <<= 1)
      ;
    for (k >>= 1; k; k >>= 1)
      if (r + k <= x &&
          1 + (long long)2 * (r + k) * ml - (long long)(r + k) * (r + k) >= 0)
        r += k;
    int u = i - 1, w = i;
    int f = -1;
    while (u >= 0 && x - v[u] - 1 <= r && w < n && v[w] - x <= r) {
      int a = x - v[u] - 1;
      int b = v[w] - x;
      if (a == b)
        f = a;
      else if (a == b + 1)
        f = a;
      else if (b == a + 1)
        f = b;
      if (f != -1) break;
      if (a < b) {
        u--;
      } else if (b < a) {
        w++;
      }
    }
    ml = f == -1 ? ml : f;
    printf("%.16f\n", (f == -1 ? 1 : 2) * atan(1.0 / ml));
  }
  return 0;
}
