#include <bits/stdc++.h>
using namespace std;
const int MAX = 3e5 + 5;
pair<int, int> building;
int n, m, d;
int a[MAX + 1];
int M[MAX * 2 + 1];
const int inf = 9e8 + 9;
signed main() {
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int q;
  m = 0;
  for (int i = 1; i <= n; i++) {
    M[++m] = a[i];
    M[++m] = a[i] + 1;
  }
  M[0] = -inf;
  M[m + 1] = inf;
  cin >> q;
  int cur = 0;
  while (q--) {
    int x;
    cin >> x;
    double ans = 0;
    double res1, res2;
    while (M[cur] < x) cur++;
    int Fir, Sec;
    if (cur % 2 == 1) {
      Fir = cur - 1;
      Sec = cur;
    } else
      Fir = cur, Sec = cur + 1;
    double w = min(x - M[Fir], M[Sec] - x);
    double other = 1e9 + 7;
    while (true) {
      if (x - M[Fir] > 2 * w + 1 || M[Sec] - x > 2 * w + 1) break;
      if (x - M[Fir] == M[Sec] - x) {
        other = x - M[Fir];
        break;
      } else if (x - M[Fir] > M[Sec] - x)
        Sec++;
      else
        Fir--;
    }
    double diagonal1 = sqrt((double)(w * w) + (double)(1));
    res1 = asin((double)(1) / diagonal1);
    double diagonal2 = sqrt((double)(other * other) + (double)(1));
    res2 = 2 * asin((double)(1) / diagonal2);
    ans = max(res1, res2);
    printf("%.12lf\n", ans);
  }
}
