#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL << 60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;
template <typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p) {
  out << p.first << ' ' << p.second;
  return out;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& v) {
  for (auto& x : v) in >> x;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> v) {
  for (int i = 0; i < v.size(); i++)
    out << v[i] << (i + 1 == v.size() ? '\n' : ' ');
  out.flush();
  return out;
}
int n, m, k;
ll a[200010];
double tab[200010];
deque<ll> lhs, rhs;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  a[n] = LINF;
  for (int i = 0; i < 200010; i++) {
    tab[i] = atan2(1, i);
  }
  cin >> m;
  for (int i = 0, j = 0; i < m; i++) {
    ll x;
    cin >> x;
    double res = 0;
    for (; j < n && a[j] <= x + k; j++) {
      rhs.push_back(a[j]);
    }
    for (; not rhs.empty() && x > rhs.front();) {
      lhs.push_front(rhs.front());
      rhs.pop_front();
    }
    for (; not lhs.empty() && x - lhs.back() > k + 1;) {
      if (lhs.size() <= 1) break;
      lhs.pop_back();
    }
    if (not lhs.empty()) {
      res = max(res, tab[x - (lhs.front() + 1)]);
    }
    if (not rhs.empty()) {
      res = max(res, tab[rhs.front() - x]);
    }
    if (not lhs.empty() || not rhs.empty()) {
      auto it1 = lhs.begin();
      for (auto y : rhs) {
        for (; it1 != lhs.end() && x - *it1 < y - x; it1++)
          ;
        if (it1 == lhs.end()) break;
        ll d1 = x - (*it1 + 1);
        ll d2 = y - x;
        if (abs(d1 - d2) <= 1) {
          res = max(res, 2 * tab[max(d1, d2)]);
          break;
        }
        if (2 * tab[max(d1, d2)] < res) break;
      }
    }
    cout << fixed << setprecision(10) << res << endl;
  }
  return 0;
}
