#include <bits/stdc++.h>
using namespace std;
const double pi = 3.1415926535897932384626433832795028;
int main() {
  cout.precision(17);
  int n, d;
  cin >> n >> d;
  vector<int> buildings;
  for (int i = 0; i < n; i++) {
    int num;
    cin >> num;
    buildings.push_back(num);
  }
  int m;
  cin >> m;
  int current = 0;
  for (int c = 1; c <= m; c++) {
    int x;
    cin >> x;
    double alpha = pi;
    while (current < n && buildings[current] < x) current++;
    int left = current - 1;
    int right = current;
    int dist;
    if (right < n &&
        (left < 0 || buildings[right] - x <= x - buildings[left] - 1)) {
      dist = buildings[right] - x;
      if (dist == 0)
        alpha = pi / 2.0;
      else
        alpha = atan2(1.0, double(dist));
    } else if (left >= 0 &&
               (right >= n || buildings[right] - x > x - buildings[left] - 1)) {
      dist = x - buildings[left] - 1;
      if (dist == 0)
        alpha = pi / 2.0;
      else
        alpha = atan2(1.0, double(dist));
    }
    bool cont = true;
    if (left < 0) cont = false;
    if (right >= n) cont = false;
    while (cont) {
      if (buildings[right] - x < x - buildings[left] - 2)
        right++;
      else if (buildings[right] - x > x - buildings[left])
        left--;
      else {
        int dist2 = max(buildings[right] - x, x - buildings[left] - 1);
        double candidate;
        if (dist2 == 0)
          candidate = pi;
        else
          candidate = 2.0 * atan2(1.0, double(dist2));
        if (candidate > alpha) alpha = candidate;
        cont = false;
      }
      if (left < 0) cont = false;
      if (right >= n) cont = false;
      if (x - buildings[left] >= 2 * dist + 5) cont = false;
      if (buildings[right] - x >= 2 * dist + 5) cont = false;
    }
    cout << alpha << endl;
  }
  return 0;
}
