// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10, Big = 8010;
const double pi = acos(-1);

ll a[maxn];

double acot(int x){
    if(x == 0)
	return pi/2;
    return atan(1/double(x));
}

bitset<Big> bsl, bsr, tmp;
int ptbs;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    for(int i = 0; i < n; i++)
	if(a[i] < Big)
	    bsr[a[i]] = 1, ptbs = i+1;
    ll nw = 0;
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	bsl = bsl << min(ll(Big + 1), x - nw);
	bsr = bsr >> min(ll(Big + 1), x - nw);
	nw = x;

	while(pt < n && a[pt]+1 <= x){
	    if(x-a[pt]-1 < Big)
		bsl[x-a[pt]-1] = 1;
	    pt++;
	}
	ptbs = max(ptbs, pt);
	while(ptbs < n && a[ptbs]-x < Big)
	    bsr[a[ptbs]-x] = 1, ptbs++;
	int dans = Big;

	tmp = bsl & bsr;
	dans = min( dans, int( tmp._Find_first() ));
	tmp = bsl & (bsr << 1);
	dans = min( dans, int( tmp._Find_first() ));
	tmp = (bsl << 1) & bsr;
	dans = min( dans, int( tmp._Find_first() ));

	double ans = 2 * acot(dans);
	if(pt != 0)
	    ans = max(ans, acot(x-a[pt-1]-1) );
	if(pt != n)
	    ans = max(ans, acot(a[pt]-x) );

	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10;
const double pi = acos(-1);

ll a[maxn];

double acot(int x){
    if(x == 0)
	return pi/2;
    return atan(1/double(x));
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int Big = 2 * min( pt == 0 ? 0 : x - a[pt-1] -1, pt == n ? 0 : a[pt]-x ) + 10;
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * acot(dans);
	if(pt != 0)
	    ans = max(ans, acot(x-a[pt-1]-1) );
	if(pt != n)
	    ans = max(ans, acot(a[pt]-x) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    int Big = d + 10;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10, Big = 2e4 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10, Big = 7111;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int Big = 2 * min( pt == 0 ? 0 : x - a[pt-1] -1, pt == n ? 0 : a[pt]-x ) + 10;
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10;
const double pi = acos(-1);

ll a[maxn];

double acot(int x){
    if(x == 0)
	return pi/2;
    return atan(1/double(x));
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int Big = d + 10;
	int dans = 1000000000;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * acot(dans);
	if(pt != 0)
	    ans = max(ans, acot(x-a[pt-1]-1) );
	if(pt != n)
	    ans = max(ans, acot(a[pt]-x) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 2e5 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    double num = atan(1 / double((d/2) + 7)) /2;
    int Big = tan( (acos(-1)/2) - num ) + 10;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 1e5 + 10, Big = 2e4 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	double ans = 0;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  ans = max(ans, 2 * atan( 1 / double(x-a[pt1]-1) ) );
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  ans = max(ans, 2 * atan( 1 / double(a[pt2]-x) ) );
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


#include<bits/stdc++.h>

using namespace std;

#define fore(i, l, r) for(int i = int(l); i < int(r); i++)
#define sz(a) int((a).size())

#define x first
#define y second

typedef long long li;

const int INF = int(1e9);
const li INF64 = li(1e18);

const int N = 200 * 1000 + 555;
const int D = 7077;

int n, d, m;
int a[N], qs[N];

inline bool read() {
	if(scanf("%d%d", &n, &d) != 2)
		return false;
	fore(i, 0, n)
		scanf("%d", &a[i]);

	assert(scanf("%d", &m) == 1);
	fore(i, 0, m)
		scanf("%d", &qs[i]);
	return true;
}

bitset<D> L, R, cur;
int dist[N];
set<int> has;

void shiftL(int s, int t, int &uk) {
	L <<= t - s;
	for(; uk < n && a[uk] < t; uk++) {
		if(t - a[uk] - 1 < D)
			L[t - a[uk] - 1] = 1;
		if(t - a[uk] < D)
			L[t - a[uk]] = 1;
	}
}

void shiftR(int s, int t, int &uk) {
	R >>= t - s;
	if(!has.count(t))
		R[0] = 0;

	for(; uk < n && a[uk] < t + D; uk++) {
		if(a[uk] - t >= 0) {
			R[a[uk] - t] = 1;
			if(a[uk] - t + 1 >= 0)
				R[a[uk] - t + 1] = 1;
		}
	}
}

inline void solve() {
	fore(i, 0, m) {
		dist[i] = INF;
		int pos = int(lower_bound(a, a + n, qs[i]) - a);
		if(pos > 0)
			dist[i] = qs[i] - a[pos - 1] - 1;
		if(pos < n)
			dist[i] = min(dist[i], a[pos] - qs[i]);
	}
	has = set<int>(a, a + n);

	int uL = 0, uR = 0;
	L.reset();
	R.reset();
	fore(i, 0, m) {
		shiftL(i > 0 ? qs[i - 1] : -D, qs[i], uL);
		shiftR(i > 0 ? qs[i - 1] : -D, qs[i], uR);

		double ans = atan2(1, dist[i]);

		cur = L & R;
		int pos = (int)cur._Find_first();
		if(pos < D) {
			int ds = pos;
			ans = max(ans, 2 * atan2(1, ds));
		}
		printf("%.15f\n", ans);
	}
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	int tt = clock();
#endif
	cout << fixed << setprecision(15);

	if(read()) {
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <cstring>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <algorithm>
#include <functional>
#include <map>
#include <cassert>
#include <bitset>

using namespace std;

typedef long long ll;
#define pii pair<ll, ll>
#define mp make_pair

ll read() {
    int f = 1;
    ll res = 0;
    char ch;
    do {
        ch = getchar();
        if (ch == '-') f = -f;
    } while (ch < '0' || ch > '9');
    do {
        res = res * 10 + ch - '0';
        ch = getchar();
    } while (ch >= '0' && ch <= '9');
    return f == 1 ? res : -res;
}

void fast_io() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const int N = 400010;
const int mod = 1000000007;
const ll INF = 1e18;
int n,m,q;
int A[N], B[N], C[N];
char str[N];
const int D = 7077;
int dist[N];
bitset<D> L, R, cur;
set<int> loc;

int head[N*2], to[N * 2], nxt[N * 2], tot;
void addEdge(int u, int v) {
    tot++;
    nxt[tot] = head[u];
    to[tot] = v;
    head[u] = tot;
}

template <class T>
T mmax(T a, T b) {
    return a < b ? b: a;
}

template <class T>
T mmin(T a, T b) {
    return a < b? a: b;
}

int countOne(int set) {
    int res = 0;
    while (set) {
        res++;
        set &= set - 1;
    }
    return res;
}

bool contain(int set, int i) {
    return (set & (1 << i)) > 0;
}

ll myPow(ll a, int p) {
    if (p == 0) return 1;
    ll res = myPow(a, p / 2);
    res *= res;
    res %= mod;
    if (p % 2 == 1) {
        res *= a;
        res %= mod;
    }
    return res;
}

void addMode(int &a, ll b) {
    a = (a+b) % mod;
}

ll mul(ll a, ll b) {
    return a * b % mod;
}

template <class T>
void mySwap(T &a, T &b) {
    T tmp = a;
    a = b;
    b = tmp;
}

void lShift(int s, int e, int &idx) {
    L <<= e - s;
    for (; idx < n && A[idx] < e; idx++) {
        if (A[idx] + D >= e) {
            L[e - A[idx]] = 1;
        }
        if (e - A[idx] - 1 >= 0)
            L[e - A[idx] - 1] = 1;
    }
}

void rShift(int s, int e, int &idx) {
    R >>= e - s;
    if (!loc.count(e)) R[0] = 0;
    for (; idx < n && A[idx] - D <= e; idx++) {
        if (A[idx] - e >= 0) {
            R[A[idx]-e] = 1;
            R[A[idx]-e+1] = 1;
        }
    }
}

int main() {
    //freopen("/Users/mobike/tmp/data.in", "r", stdin);
    //freopen("/Users/mobike/tmp/data.out", "w", stdout);
    fast_io();

    int d;
    cin >> n >> d;
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }
    cin >> m;
    fill(B, B+m, mod);

    for (int i = 0; i < m; i++) {
        cin >> B[i];
        int idx = lower_bound(A, A+n, B[i]) - A;
        if (idx > 0) dist[i] = mmin(dist[i], B[i] - A[idx-1] - 1);
        if (idx < n) dist[i] = mmin(dist[i], A[idx] - B[i]);
    }

    L.reset();
    R.reset();
    loc = set<int>(A, A+n);

    int li = 0, ri = 0;
    for (int i = 0; i < m; i++) {
        lShift(i>0?B[i-1]:-D, B[i], li);
        rShift(i>0?B[i-1]:-D, B[i], ri);

        cur = L&R;
        double ans = atan2(1, dist[i]);
        int pos = (int)(cur._Find_first());
        if (pos < D) {
            ans = mmax(ans, 2 * atan2(1, pos));
        }
        cout << ans << endl;
    }
    return 0;
}


#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <cstring>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <algorithm>
#include <functional>
#include <map>
#include <cassert>
#include <bitset>
#include <iomanip>

using namespace std;

typedef long long ll;
#define pii pair<ll, ll>
#define mp make_pair

ll read() {
    int f = 1;
    ll res = 0;
    char ch;
    do {
        ch = getchar();
        if (ch == '-') f = -f;
    } while (ch < '0' || ch > '9');
    do {
        res = res * 10 + ch - '0';
        ch = getchar();
    } while (ch >= '0' && ch <= '9');
    return f == 1 ? res : -res;
}

void fast_io() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const int N = 400010;
const int mod = 1000000007;
const ll INF = 1e18;
int n,m,q;
int A[N], B[N], C[N];
char str[N];
const int D = 7077;
int dist[N];
bitset<D> L, R, cur;
set<int> loc;

int head[N*2], to[N * 2], nxt[N * 2], tot;
void addEdge(int u, int v) {
    tot++;
    nxt[tot] = head[u];
    to[tot] = v;
    head[u] = tot;
}

template <class T>
T mmax(T a, T b) {
    return a < b ? b: a;
}

template <class T>
T mmin(T a, T b) {
    return a < b? a: b;
}

int countOne(int set) {
    int res = 0;
    while (set) {
        res++;
        set &= set - 1;
    }
    return res;
}

bool contain(int set, int i) {
    return (set & (1 << i)) > 0;
}

ll myPow(ll a, int p) {
    if (p == 0) return 1;
    ll res = myPow(a, p / 2);
    res *= res;
    res %= mod;
    if (p % 2 == 1) {
        res *= a;
        res %= mod;
    }
    return res;
}

void addMode(int &a, ll b) {
    a = (a+b) % mod;
}

ll mul(ll a, ll b) {
    return a * b % mod;
}

template <class T>
void mySwap(T &a, T &b) {
    T tmp = a;
    a = b;
    b = tmp;
}

void lShift(int s, int e, int &idx) {
    L <<= e - s;
    for (; idx < n && A[idx] < e; idx++) {
        if (e - A[idx] <= D) {
            L[e - A[idx]] = 1;
        }
        if (e - A[idx] - 1 <= D)
            L[e - A[idx] - 1] = 1;
    }
}

void rShift(int s, int e, int &idx) {
    R >>= e - s;
    if (!loc.count(e)) R[0] = 0;
    for (; idx < n && A[idx] - D <= e; idx++) {
        if (A[idx] - e >= 0) {
            R[A[idx]-e] = 1;
            R[A[idx]-e+1] = 1;
        }
    }
}

int main() {
    //freopen("/Users/mobike/tmp/data.in", "r", stdin);
    //freopen("/Users/mobike/tmp/data.out", "w", stdout);
    fast_io();
    cout << fixed << setprecision(15);

    int d;
    cin >> n >> d;
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }
    cin >> m;
    fill(dist, dist+m, mod);

    for (int i = 0; i < m; i++) {
        cin >> B[i];
        int idx = (int)(lower_bound(A, A+n, B[i]) - A);
        if (idx > 0) dist[i] = mmin(dist[i], B[i] - A[idx-1] - 1);
        if (idx < n) dist[i] = mmin(dist[i], A[idx] - B[i]);
    }

    L.reset();
    R.reset();
    loc = set<int>(A, A+n);

    int li = 0, ri = 0;
    for (int i = 0; i < m; i++) {
        lShift(i>0?B[i-1]:-D, B[i], li);
        rShift(i>0?B[i-1]:-D, B[i], ri);

        cur = L&R;
        double ans = atan2(1, dist[i]);
        int pos = (int)(cur._Find_first());
        if (pos < D) {
            ans = mmax(ans, 2 * atan2(1, pos));
        }
        cout << ans << endl;
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define fore(i, l, r) for(int i = int(l); i < int(r); i++)
#define sz(a) int((a).size())

#define x first
#define y second

typedef long long li;

const int INF = int(1e9);
const li INF64 = li(1e18);

const int N = 200 * 1000 + 555;
const int D = 7077;

int n, d, m;
int a[N], qs[N];

inline bool read() {
	if(scanf("%d%d", &n, &d) != 2)
		return false;
	fore(i, 0, n)
		scanf("%d", &a[i]);

	assert(scanf("%d", &m) == 1);
	fore(i, 0, m)
		scanf("%d", &qs[i]);
	return true;
}

bitset<D> L, R, cur;
int dist[N];
set<int> has;

void shiftL(int s, int t, int &uk) {
	L <<= t - s;
	for(; uk < n && a[uk] < t; uk++) {
		if(t - a[uk] - 1 < D)
			L[t - a[uk] - 1] = 1;
		if(t - a[uk] < D)
			L[t - a[uk]] = 1;
	}
}

void shiftR(int s, int t, int &uk) {
	R >>= t - s;

	for(; uk < n && a[uk] < t + D; uk++) {
		if(a[uk] - t >= 0) {
			R[a[uk] - t] = 1;
			if(a[uk] - t + 1 >= 0)
				R[a[uk] - t + 1] = 1;
		}
	}
}

inline void solve() {
	fore(i, 0, m) {
		dist[i] = INF;
		int pos = int(lower_bound(a, a + n, qs[i]) - a);
		if(pos > 0)
			dist[i] = qs[i] - a[pos - 1] - 1;
		if(pos < n)
			dist[i] = min(dist[i], a[pos] - qs[i]);
	}

	int uL = 0, uR = 0;
	L.reset();
	R.reset();
	fore(i, 0, m) {
		shiftL(i > 0 ? qs[i - 1] : -D, qs[i], uL);
		shiftR(i > 0 ? qs[i - 1] : -D, qs[i], uR);

		double ans = atan2(1, dist[i]);

		cur = L & R;
		int pos = (int)cur._Find_first();
		if(pos < D) {
			int ds = pos;
			ans = max(ans, 2 * atan2(1, ds));
		}
		printf("%.15f\n", ans);
	}
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	int tt = clock();
#endif
	cout << fixed << setprecision(15);

	if(read()) {
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <cstring>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <algorithm>
#include <functional>
#include <map>
#include <cassert>
#include <bitset>
#include <iomanip>

using namespace std;

typedef long long ll;
#define pii pair<ll, ll>
#define mp make_pair

ll read() {
    int f = 1;
    ll res = 0;
    char ch;
    do {
        ch = getchar();
        if (ch == '-') f = -f;
    } while (ch < '0' || ch > '9');
    do {
        res = res * 10 + ch - '0';
        ch = getchar();
    } while (ch >= '0' && ch <= '9');
    return f == 1 ? res : -res;
}

void fast_io() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const int N = 400010;
const int mod = 1000000007;
const ll INF = 1e18;
int n,m,q;
int A[N], B[N], C[N];
char str[N];
const int D = 7077;
int dist[N];
bitset<D> L, R, cur;
set<int> loc;

int head[N*2], to[N * 2], nxt[N * 2], tot;
void addEdge(int u, int v) {
    tot++;
    nxt[tot] = head[u];
    to[tot] = v;
    head[u] = tot;
}

template <class T>
T mmax(T a, T b) {
    return a < b ? b: a;
}

template <class T>
T mmin(T a, T b) {
    return a < b? a: b;
}

int countOne(int set) {
    int res = 0;
    while (set) {
        res++;
        set &= set - 1;
    }
    return res;
}

bool contain(int set, int i) {
    return (set & (1 << i)) > 0;
}

ll myPow(ll a, int p) {
    if (p == 0) return 1;
    ll res = myPow(a, p / 2);
    res *= res;
    res %= mod;
    if (p % 2 == 1) {
        res *= a;
        res %= mod;
    }
    return res;
}

void addMode(int &a, ll b) {
    a = (a+b) % mod;
}

ll mul(ll a, ll b) {
    return a * b % mod;
}

template <class T>
void mySwap(T &a, T &b) {
    T tmp = a;
    a = b;
    b = tmp;
}

void lShift(int s, int e, int &idx) {
    L <<= e - s;
    for (; idx < n && A[idx] < e; idx++) {
        if (e - A[idx] <= D) {
            L[e - A[idx]] = 1;
        }
        if (e - A[idx] - 1 <= D)
            L[e - A[idx] - 1] = 1;
    }
}

void rShift(int s, int e, int &idx) {
    R >>= e - s;
    if (!loc.count(e)) R[0] = 0;
    for (; idx < n && A[idx] - D <= e; idx++) {
        if (A[idx] - e >= 0) {
            R[A[idx]-e] = 1;
            R[A[idx]-e+1] = 1;
        }
    }
}

int main() {
    //freopen("/Users/mobike/tmp/data.in", "r", stdin);
    //freopen("/Users/mobike/tmp/data.out", "w", stdout);
    fast_io();
    cout << fixed << setprecision(15);

    int d;
    cin >> n >> d;
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }
    cin >> m;
    fill(B, B+m, mod);

    for (int i = 0; i < m; i++) {
        cin >> B[i];
        int idx = (int)(lower_bound(A, A+n, B[i]) - A);
        if (idx > 0) dist[i] = mmin(dist[i], B[i] - A[idx-1] - 1);
        if (idx < n) dist[i] = mmin(dist[i], A[idx] - B[i]);
    }

    L.reset();
    R.reset();
    loc = set<int>(A, A+n);

    int li = 0, ri = 0;
    for (int i = 0; i < m; i++) {
        lShift(i>0?B[i-1]:-D, B[i], li);
        rShift(i>0?B[i-1]:-D, B[i], ri);

        cur = L&R;
        double ans = atan2(1, dist[i]);
        int pos = (int)(cur._Find_first());
        if (pos < D) {
            ans = mmax(ans, 2 * atan2(1, pos));
        }
        cout << ans << endl;
    }
    return 0;
}


#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <cstring>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <algorithm>
#include <functional>
#include <map>
#include <cassert>
#include <bitset>

using namespace std;

typedef long long ll;
#define pii pair<ll, ll>
#define mp make_pair

ll read() {
    int f = 1;
    ll res = 0;
    char ch;
    do {
        ch = getchar();
        if (ch == '-') f = -f;
    } while (ch < '0' || ch > '9');
    do {
        res = res * 10 + ch - '0';
        ch = getchar();
    } while (ch >= '0' && ch <= '9');
    return f == 1 ? res : -res;
}

void fast_io() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const int N = 400010;
const int mod = 1000000007;
const ll INF = 1e18;
int n,m,q;
int A[N], B[N], C[N];
char str[N];
const int D = 7077;
int dist[N];
bitset<D> L, R, cur;
set<int> loc;

int head[N*2], to[N * 2], nxt[N * 2], tot;
void addEdge(int u, int v) {
    tot++;
    nxt[tot] = head[u];
    to[tot] = v;
    head[u] = tot;
}

template <class T>
T mmax(T a, T b) {
    return a < b ? b: a;
}

template <class T>
T mmin(T a, T b) {
    return a < b? a: b;
}

int countOne(int set) {
    int res = 0;
    while (set) {
        res++;
        set &= set - 1;
    }
    return res;
}

bool contain(int set, int i) {
    return (set & (1 << i)) > 0;
}

ll myPow(ll a, int p) {
    if (p == 0) return 1;
    ll res = myPow(a, p / 2);
    res *= res;
    res %= mod;
    if (p % 2 == 1) {
        res *= a;
        res %= mod;
    }
    return res;
}

void addMode(int &a, ll b) {
    a = (a+b) % mod;
}

ll mul(ll a, ll b) {
    return a * b % mod;
}

template <class T>
void mySwap(T &a, T &b) {
    T tmp = a;
    a = b;
    b = tmp;
}

void lShift(int s, int e, int &idx) {
    L <<= e - s;
    for (; idx < n && A[idx] < e; idx++) {
        if (e - A[idx] <= D) {
            L[e - A[idx]] = 1;
        }
        if (e - A[idx] - 1 <= D)
            L[e - A[idx] - 1] = 1;
    }
}

void rShift(int s, int e, int &idx) {
    R >>= e - s;
    if (!loc.count(e)) R[0] = 0;
    for (; idx < n && A[idx] - D <= e; idx++) {
        if (A[idx] - e >= 0) {
            R[A[idx]-e] = 1;
            R[A[idx]-e+1] = 1;
        }
    }
}

int main() {
    //freopen("/Users/mobike/tmp/data.in", "r", stdin);
    //freopen("/Users/mobike/tmp/data.out", "w", stdout);
    fast_io();
    cout << fixed << setprecision(15);

    int d;
    cin >> n >> d;
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }
    cin >> m;
    fill(B, B+m, mod);

    for (int i = 0; i < m; i++) {
        cin >> B[i];
        int idx = (int)(lower_bound(A, A+n, B[i]) - A);
        if (idx > 0) dist[i] = mmin(dist[i], B[i] - A[idx-1] - 1);
        if (idx < n) dist[i] = mmin(dist[i], A[idx] - B[i]);
    }

    L.reset();
    R.reset();
    loc = set<int>(A, A+n);

    int li = 0, ri = 0;
    for (int i = 0; i < m; i++) {
        lShift(i>0?B[i-1]:-D, B[i], li);
        rShift(i>0?B[i-1]:-D, B[i], ri);

        cur = L&R;
        double ans = atan2(1, dist[i]);
        int pos = (int)(cur._Find_first());
        if (pos < D) {
            ans = mmax(ans, 2 * atan2(1, pos));
        }
        cout << ans << endl;
    }
    return 0;
}


#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <cstring>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <algorithm>
#include <functional>
#include <map>
#include <cassert>
#include <bitset>
#include <iomanip>

using namespace std;

typedef long long ll;
#define pii pair<ll, ll>
#define mp make_pair

ll read() {
    int f = 1;
    ll res = 0;
    char ch;
    do {
        ch = getchar();
        if (ch == '-') f = -f;
    } while (ch < '0' || ch > '9');
    do {
        res = res * 10 + ch - '0';
        ch = getchar();
    } while (ch >= '0' && ch <= '9');
    return f == 1 ? res : -res;
}

void fast_io() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const int N = 400010;
const int mod = 1000000007;
const ll INF = 1e18;
int n,m,q;
int A[N], B[N], C[N];
char str[N];
const int D = 7077;
int dist[N];
bitset<D> L, R, cur;
set<int> loc;

int head[N*2], to[N * 2], nxt[N * 2], tot;
void addEdge(int u, int v) {
    tot++;
    nxt[tot] = head[u];
    to[tot] = v;
    head[u] = tot;
}

template <class T>
T mmax(T a, T b) {
    return a < b ? b: a;
}

template <class T>
T mmin(T a, T b) {
    return a < b? a: b;
}

int countOne(int set) {
    int res = 0;
    while (set) {
        res++;
        set &= set - 1;
    }
    return res;
}

bool contain(int set, int i) {
    return (set & (1 << i)) > 0;
}

ll myPow(ll a, int p) {
    if (p == 0) return 1;
    ll res = myPow(a, p / 2);
    res *= res;
    res %= mod;
    if (p % 2 == 1) {
        res *= a;
        res %= mod;
    }
    return res;
}

void addMode(int &a, ll b) {
    a = (a+b) % mod;
}

ll mul(ll a, ll b) {
    return a * b % mod;
}

template <class T>
void mySwap(T &a, T &b) {
    T tmp = a;
    a = b;
    b = tmp;
}

void lShift(int s, int e, int &idx) {
    L <<= e - s;
    for (; idx < n && A[idx] < e; idx++) {
        if (e - A[idx] < D) {
            L[e - A[idx]] = 1;
        }
        if (e - A[idx] - 1 < D)
            L[e - A[idx] - 1] = 1;
    }
}

void rShift(int s, int e, int &idx) {
    R >>= e - s;
    if (!loc.count(e)) R[0] = 0;
    for (; idx < n && A[idx] - D < e; idx++) {
        if (A[idx] - e >= 0) {
            R[A[idx]-e] = 1;
            R[A[idx]-e+1] = 1;
        }
    }
}

int main() {
    //freopen("/Users/mobike/tmp/data.in", "r", stdin);
    //freopen("/Users/mobike/tmp/data.out", "w", stdout);
    fast_io();
    cout << fixed << setprecision(15);

    int d;
    cin >> n >> d;
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }
    cin >> m;
    fill(dist, dist+m, mod);

    for (int i = 0; i < m; i++) {
        cin >> B[i];
        int idx = (int)(lower_bound(A, A+n, B[i]) - A);
        if (idx > 0) dist[i] = mmin(dist[i], B[i] - A[idx-1] - 1);
        if (idx < n) dist[i] = mmin(dist[i], A[idx] - B[i]);
    }

    L.reset();
    R.reset();
    loc = set<int>(A, A+n);

    int li = 0, ri = 0;
    for (int i = 0; i < m; i++) {
        lShift(i>0?B[i-1]:-D, B[i], li);
        rShift(i>0?B[i-1]:-D, B[i], ri);

        cur = L&R;
        double ans = atan2(1, dist[i]);
        int pos = (int)(cur._Find_first());
        if (pos < D) {
            ans = mmax(ans, 2 * atan2(1, pos));
        }
        cout << ans << endl;
    }
    return 0;
}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

void run()
{
    ints(n, d);
    int x;
    vector<int> a(n);
    readln(a);
    ints(m);
    cout << fixed << setprecision(10);
    vector<double> answers(d + 1);
    fori1(d + 1) answers[i] = atan2(1, i);
    answers[0] = 1.570796326794897;
    int first = 0;
    forn(q, m)
    {
        readln(x);
        while (first < n && a[first] < x) ++first;
        if (first == n)
        {
            writeln(answers[x - a.back() - 1]);
            continue;
        }
        if (first == 0)
        {
            writeln(answers[0]);
            continue;
        }
        int last = first - 1;
        auto get = [&](int value) {
            vector<bool> temp(3, false);
            while (last >= 0 && a[last] > value) --last;
            fori(3)
                if (int j = last - i; j >= 0 && a[j] <= value && a[j] >= value - 2)
                    temp[value - a[j]] = true;

            return temp;
        };

        int closest = min(a[first] - x, x - a[first - 1] - 1);
        if (a[first] == x && a[first - 1] == x - 1)
        {
            writeln(3.141592653589793);
            continue;
        }
        if (closest == 0)
        {
            writeln(answers[0]);
            continue;
        }
        double ans = answers[closest];
        bool ok = false;
        for (int i = first; !ok && i < n && a[i] <= x + closest * 2; ++i)
        {
            auto triple = get(2 * x - a[i]);
            for (int j = 0; !ok && j < 3; ++j)
                if (triple[j])
                    ok = true,
                    ans = max(ans, answers[a[i] - x + (j == 2)] * 2);
        }
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i <= closest * 2; ++i)
            if (can(x + i))
                for (int j = 0; !ok && j < 3; ++j)
                    if (!ok && can(x - i - j))
                        ok = true,
                        closest = i + (j == 2);
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i < closest * 2; ++i)
            if (can(x + i))
                for (int j = 0; !ok && j < 3; ++j)
                    if (can(x - i - j))
                        ok = true,
                        closest = i + (j == 2);
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        double ans = answers[closest];
        bool ok = false;
        for (auto i = it; !ok && i != has.end() && *i <= x + closest * 2; ++i)
            for (int j = 0; !ok && j < 3; ++j)
                if (can(x - (*i - x) - j))
                    ok = true,
                    ans = max(ans, answers[*i - x + (j == 2)] * 2);
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        double ans = answers[closest];
        bool ok = false;
        for (int i = closest; !ok && i <= closest * 2; ++i)
        {
            if (can(x + i))
                for (int j = 0; !ok && j < 3; ++j)
                    if (can(x - i - j))
                        ok = true,
                        ans = max(ans, answers[i + (j == 2)] * 2);
        }
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

static const int N = 2 * 100000 + 7000 + 2;
bool has[N];

void run()
{
    ints(n, d);
    int x, mx = 0, mn = N;
    fori(n)
        readln(x),
        mx = max(mx, x),
        mn = min(mn, x),
        has[x] = true;
    ints(m);
    cout << fixed << setprecision(15);
    auto can = [&](int i) {
        return i >= 0 && has[i];
    };
    forn(q, m)
    {
        readln(x);
        if (x && has[x - 1] && has[x])
        {
            writeln(3.141592653589793);
            continue;
        }
        if ((x && has[x - 1]) || has[x])
        {
            writeln(1.570796326794897);
            continue;
        }
        if (x > mx)
        {
            writeln(atan2(x - mx + 1, 1));
            continue;
        }
        if (x < mn)
        {
            writeln(atan2(mn - x, 1));
            continue;
        }
        double ans = 0;
        for (int i = 1; i <= d + 1; ++i)
        {
            if (can(x + i))
                ans = max(ans, atan2(1, i));
            if (can(x - i - 1))
                ans = max(ans, atan2(1, i));
            if (can(x + i) && can(x - i - 2))
                ans = max(ans, 2 * atan2(1, i + 1));
            if (can(x + i) && can(x - i - 1))
                ans = max(ans, 2 * atan2(1, i));
            if (can(x + i) && can(x - i))
                ans = max(ans, 2 * atan2(1, i));

        }
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }
        double ans = 0;
        for (int i = 1; i <= d + 1; ++i)
        {
            if (can(x + i))
                ans = max(ans, atan2(1, i));
            if (can(x - i - 1))
                ans = max(ans, atan2(1, i));
            if (can(x + i) && can(x - i - 2))
                ans = max(ans, 2 * atan2(1, i + 1));
            if (can(x + i) && can(x - i - 1))
                ans = max(ans, 2 * atan2(1, i));
            if (can(x + i) && can(x - i))
                ans = max(ans, 2 * atan2(1, i));

        }
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i <= min(closest * 2 - 1, d + 1); ++i)
            if (can(x + i))
                for (int j = 0; j < 3; ++j)
                    if (!ok && can(x - i - j))
                        ok = true,
                        closest = i + (j == 2);
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i <= closest * 2 - 1; ++i)
            if (can(x + i))
                for (int j = 0; j < 3; ++j)
                    if (!ok && can(x - i - j))
                        ok = true,
                        closest = i + (j == 2);
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

void run()
{
    ints(n, d);
    int x;
    vector<int> a(n);
    readln(a);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1) answers[i] = atan2(1, i);
    answers[0] = 1.570796326794897;
    int first = 0;
    forn(q, m)
    {
        readln(x);
        while (first < n && a[first] < x) ++first;
        if (first == n)
        {
            writeln(answers[x - a.back() - 1]);
            continue;
        }
        if (first == 0)
        {
            writeln(answers[0]);
            continue;
        }
        int last = first - 1;
        auto get = [&](int value) {
            int temp = 3;
            while (last >= 0 && a[last] > value) --last;
            fori(3)
                if (int j = last - i; j >= 0 && a[j] <= value && a[j] >= value - 2)
                    temp = min(temp, value - a[j]);

            return temp;
        };

        int closest = min(a[first] - x, x - a[first - 1] - 1);
        if (a[first] == x && a[first - 1] == x - 1)
        {
            writeln(3.141592653589793);
            continue;
        }
        if (closest == 0)
        {
            writeln(answers[0]);
            continue;
        }
        double ans = answers[closest];
        bool ok = false;
        for (int i = first; !ok && i < n && a[i] <= x + d; ++i)
            if (int triple = get(2 * x - a[i]); triple != 3)
                ok = true,
                ans = max(ans, answers[a[i] - x + (triple == 2)] * 2);
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i <= closest * 2; ++i)
            if (can(x + i))
                for (int j = 0; j < 3; ++j)
                    if (!ok && can(x - i - j))
                        ok = true,
                        closest = i + (j == 2);
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

void run()
{
    ints(n, d);
    int x;
    vector<int> a(n);
    readln(a);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1) answers[i] = atan2(1, i);
    answers[0] = 1.570796326794897;
    int first = 0;
    forn(q, m)
    {
        readln(x);
        while (first < n && a[first] < x) ++first;
        if (first == n)
        {
            writeln(answers[x - a.back() - 1]);
            continue;
        }
        if (first == 0)
        {
            writeln(answers[0]);
            continue;
        }
        int last = first - 1;
        auto get = [&](int value) {
            int temp = 3;
            while (last >= 0 && a[last] > value) --last;
            fori(3)
                if (int j = last - i; j >= 0 && a[j] <= value && a[j] >= value - 2)
                    temp = min(temp, value - a[j]);

            return temp;
        };

        int closest = min(a[first] - x, x - a[first - 1] - 1);
        if (a[first] == x && a[first - 1] == x - 1)
        {
            writeln(3.141592653589793);
            continue;
        }
        if (closest == 0)
        {
            writeln(answers[0]);
            continue;
        }
        double ans = answers[closest];
        bool ok = false;
        for (int i = first; !ok && i < n && a[i] <= x + closest * 2; ++i)
            if (int triple = get(2 * x - a[i]); triple != 3)
                ok = true,
                ans = max(ans, answers[a[i] - x + (triple == 2)] * 2);
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    auto can = [&](int i) {
        return i >= 0 && has.find(i) != has.end();
    };
    forn(q, m)
    {
        readln(x);
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }
        double ans = 0;
        for (int i = 1; i <= d + 1; ++i)
        {
            if (can(x + i))
                ans = max(ans, atan2(1, i));
            if (can(x - i - 1))
                ans = max(ans, atan2(1, i));
            if (can(x + i) && can(x - i - 2))
                ans = max(ans, 2 * atan2(1, i + 1));
            if (can(x + i) && can(x - i - 1))
                ans = max(ans, 2 * atan2(1, i));
            if (can(x + i) && can(x - i))
                ans = max(ans, 2 * atan2(1, i));

        }
        writeln(ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}


// Igorjan94, template version from 13 October 2017. C++17 version, modified 07 August 2018 (&&, whole) {{{
#include <bits/stdc++.h>

using namespace std;

#define FILENAME "input"

#define FOR(i, m, n) for (int i = m; i <  (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n)   for (int i = 0; i < (int) (n); ++i)
#define  fori1(n)    for (int i = 1; i < (int) (n); ++i)
#define  forj1(n)    for (int j = 1; j < (int) (n); ++j)
#define   fori(n)    for (int i = 0; i < (int) (n); ++i)
#define   forj(n)    for (int j = 0; j < (int) (n); ++j)
#define     SZ(a)    int(size(a))

typedef  pair<int, int>   pii;
typedef  valarray<int>    va;
typedef   vector<int>     vi;
typedef    long long      ll;

#define    pb    push_back
#define whole(a) begin(a), end(a)
#define   next   next__
#define   prev   prev__
#define  count   count__

#define ints(a...)  int a; readln(a)
#define wr(args...) err(#args, args)

#define ttt12i template<class T1, class T2> inline
#define  tthti template<class H, class...T> inline
#define  ttta  template<class... Args> inline
#define  ttti  template<class T> inline

const int MOD = 1000000007;
const int INTMAX = numeric_limits<int>::max();
const ll LLMAX = numeric_limits<ll>::max();

void writeln(){cout<<"\n";}ttti void print(T&& a);ttti void priws(T&& a);ttti void read(T& a);
ttta void readln(Args&... args){(read(args),...);}tthti void writeln(H&& h,T&&...t){priws(h);(print(t),...);writeln();}
ttti void writeln_range(T f,T s){if(f!=s)for(auto i=f;i!=s;++i)writeln(*i);}
vector<string>split(string&s,string d){vector<string>v;size_t p=0;while((p=s.find(d))!=string::npos)v.pb(s.substr(0,p)),s.erase(0,p+d.length());v.pb(s);return v;}
ttta void err(string v,Args...args){auto vv=split(v,", ");auto it=vv.begin();(writeln(*it++,"=",args),...);}

//Igorjan
//}}}

bool dp[15000];

void run()
{
    ints(n, d);
    int x;
    set<int> has;
    fori(n)
        readln(x),
        has.insert(x);
    ints(m);
    cout << fixed << setprecision(15);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        readln(x);
        fori(d * 2 + 4) dp[i] = false;
        auto it = has.lower_bound(x - d - 1);
        while (it != has.end() && *it < x + d + 1)
            dp[*it - x + d + 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - x + d + 1];
        };
        if (can(x - 1) && can(x))
        {
            writeln(3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            writeln(1.570796326794897);
            continue;
        }

        it = has.lower_bound(x);
        auto it2 = it; it2--;
        int closest = min(*it - x, x - *it2 - 1);
        bool ok = false;
        for (int i = closest; !ok && i < closest * 2; ++i)
        {
            int temp = d * 2;
            if (can(x + i))
                for (int j = 0; !ok && j < 3; ++j)
                    if (can(x - i - j))
                        ok = true,
                        temp = min(temp, i + (j == 2));
            if (can(x - i - 1) && can(x + i + 1))
                ok = true,
                temp = min(temp, i + 1);
            if (ok)
                closest = temp;
        }
        writeln(answers[closest] * (ok + 1));
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
    ios_base::sync_with_stdio(false);
//    freopen(FILENAME".in", "r", stdin);
//    freopen(FILENAME".out", "w", stdout);
    run();
#ifndef ONLINE_JUDGE
    writeln("execution time =", (clock() - time) / CLOCKS_PER_SEC);
#endif
    return 0;
}

#define a _a
#define n _n
ttti   ostream&operator<<(ostream&os,vector<T>const&a);
ttt12i istream&operator>>(istream&is,pair<T1,T2>&a){return is>>a.first>>a.second;}
ttt12i ostream&operator<<(ostream&os,pair<T1,T2>const&a){return os<<a.first<<" "<<a.second;}
ttti   ostream&operator<<(ostream&os,vector<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   ostream&operator<<(ostream&os,valarray<T>const&a){if(a.size())os<<a[0];else os<<"\n";fori1(a.size())os<<"\n "[is_fundamental<T>::value]<<a[i];return os;}
ttti   istream&operator>>(istream&is,vector<T>&a){fori(a.size())is>>a[i];return is;}
ttti   istream&operator>>(istream&is,valarray<T>&a){fori(a.size())is>>a[i];return is;}
ttti void print(T&&a){cout<<" "<<a;}
ttti void priws(T&&a){cout<<a;}
ttti void read(T&a){cin>>a;} //}}}