#include <bits/stdc++.h>
using namespace std;
int n, d;
int arr[200005];
int m;
int qr;
int main() {
  scanf("%d %d", &n, &d);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  scanf("%d", &m);
  int hl = 0;
  while (m--) {
    scanf("%d", &qr);
    if (qr == 0 || qr == arr[n] + 1) {
      printf("%.12lf\n", (atan(1) * 4) / 2);
      continue;
    }
    while (hl + 1 <= n && arr[hl + 1] < qr) {
      hl++;
    }
    int di = qr - arr[hl] - 1;
    int dj = arr[hl + 1] - qr;
    if (di == 0 && dj == 0) {
      printf("%.12lf\n", (atan(1) * 4));
      continue;
    } else if (di == 0 || dj == 0) {
      printf("%.12lf\n", (atan(1) * 4) / 2);
      continue;
    }
    double alpha = atan(1.0 / (min(di, dj)));
    double beta;
    for (int i = hl, j = hl + 1; i >= 1 && j <= n &&
                                 (di = qr - arr[i] - 1) <= 7000 &&
                                 (dj = arr[j] - qr) <= 7000;) {
      if (di + 1 < dj)
        i--;
      else if (dj + 1 < di)
        j++;
      else {
        if (alpha < (beta = atan(1.0 / max(di, dj)) * 2.0)) alpha = beta;
        break;
      }
    }
    printf("%.12lf\n", alpha);
    continue;
  }
}
