// 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, 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);
    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 - d - 1] = true,
            it++;
        auto can = [&](int i) {
            return i >= 0 && dp[i - 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
//}}}

void run()
{
    ints(n, d);
    vector<int> a(n);
    readln(a);
    ints(m);
    set<int> has;
    cout << fixed << setprecision(15);
    auto can = [&](int i) {
        return i >= 0 && has.find(i) != has.end();
    };
    int last = 0;
    forn(q, m)
    {
        ints(x);
        while (!has.empty() && *has.begin() + d + 2 < x)
            has.erase(has.begin());
        while (last < n && a[last] < x + d + 2)
            has.insert(a[last++]);
        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);
    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 / 2 + 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()
{
    int n, d, x, m;
    scanf("%d%d", &n, &d);
    set<int> has;
    fori(n)
        scanf("%d", &x),
        has.insert(x);
    scanf("%d", &m);
    vector<double> answers(d + 1);
    fori1(d + 1)
        answers[i] = atan2(1, i);
    forn(q, m)
    {
        scanf("%d", &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))
        {
            printf("%.15f\n", 3.141592653589793);
            continue;
        }
        if (can(x - 1) || can(x))
        {
            printf("%.15f\n", 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);
        }
        printf("%.15f\n", ans);
    }
}

//{{{
int main()
{
#ifndef ONLINE_JUDGE
    double time = clock();
#endif
//    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;
        bool ok = true;
        for (int i = 1; ok && i <= d / 2 + 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))
                ok = false,
                ans = max(ans, 2 * atan2(1, i + 1));
            if (can(x + i) && can(x - i - 1))
                ok = false,
                ans = max(ans, 2 * atan2(1, i));
            if (can(x + i) && can(x - i))
                ok = false,
                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
//}}}

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) {
            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)
        {
            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;} //}}}


// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int maxn = 2e5 + 14, maxd = 7e3 + 14;

int n, a[maxn];
bitset<maxd> past, nxt;
int main(){
    ios::sync_with_stdio(0), cin.tie(0);
    cout << fixed << setprecision(9);
    cin >> n;
    cin.ignore(10, '\n');
    for(int i = 0; i < n; i++)
    	cin >> a[i];
    int cx = 0, pp = 0, pn = 0;
    while(pn < n && a[pn] < maxd)
    	nxt[a[pn++]] = 1;
    int q;
    cin >> q;
    while(q--){
    	int x;
    	cin >> x;
    	while(pp < n && a[pp] < x){
    		past <<= a[pp] - cx + 1;
    		nxt >>= a[pp] - cx + 1;
    		past[0] = 1;
    		cx = a[pp++] + 1;
    	}
    	past <<= x - cx;
    	nxt >>= x - cx;
    	cx = x;
	    while(pn < n && a[pn] < cx + maxd){
	    	if(a[pn] - cx >= 0)
	    		nxt[a[pn] - cx] = 1;
	    	pn++;
	    }
	    int mnd = maxd;
	    if(pp < n)
	    	mnd = min(mnd, a[pp] - cx);
	    if(pp)
	    	mnd = min(mnd, cx - a[pp - 1] - 1);
	    ld ans = atanl(ld(1) / mnd);
	    ans = max(ans, atanl(ld(1) / (past & (nxt << 1 | nxt))._Find_first()) * 2);
	    ans = max(ans, atanl(ld(1) / ((past << 1) & nxt)._Find_first()) * 2);
	    cout << ans << '\n';
    }
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define pb push_back
#define pii pair<int, int>
#define ll long long
#define ff first
#define ss second
#define mp make_pair

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

#define MOD 1000000007LL
#define N 200005
bitset<8000> le, ri;
int a[N];
int qq[N];
vector<int> dot;
int now = -10000;
int r = 1, l = 0;
int sz;
void nico(int x){
    le <<= x - now;
    ri >>= x - now;
    while(r != sz && dot[r] < x + 8000){
        if(dot[r] > x){
            ri[dot[r] - x] = 1;
        }
        r++;
    }
    while(l != sz && dot[l] < x){
        if(dot[l] > x - 8000){
            le[x - dot[l]] = 1;
        }
        l++;
    }

    now = x;
}

set<int> s, sad;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    int n, d, q;
    double pi = 4.0 * atan(1);
    cin>>n>>d;

    a[0] = INT_MIN;
    dot.pb(INT_MIN);
    a[n + 1] = INT_MAX;
    d = 8000;
    sad.insert(a[0]);
    sad.insert(a[n + 1]);

    for(int i = 1; i <= n; i++){
        cin>>a[i];
        if(dot.back() != a[i]) dot.pb(a[i]);
        else s.insert(a[i]);
        dot.pb(a[i] + 1);
        sad.insert(a[i] + 1);
        sad.insert(a[i]);
    }

    dot.pb(INT_MAX);
    sz = dot.size();

    cin>>q;
    int x;
    for(int i = 1; i <= q; i++){
        cin>>x;
        if(s.count(x)){
            printf("%.12f\n", pi);
            continue;
        }
        if(sad.count(x)){
            printf("%.12f\n", pi / 2.0);
            continue;
        }
        nico(x);
        int t = min(le._Find_first(), ri._Find_first());
        int q = (le & ri)._Find_first();
//        cerr<<x<<" Case 1: "<<t<<" Case 2: "<<q<<'\n';
        printf("%.12f\n", max(pi - 2.0 * atan(q), pi / 2 - atan(t)));
    }
}


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


#include <bits/stdc++.h>
using namespace std;
typedef double lf;
const lf PI = acos(-1);
const int N = 2e5 + 9;
int n, d, m, x, cur, a[N];
int main()
{
	scanf("%d%d", &n, &d);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &a[i]);
	for (scanf("%d", &m); m--;)
	{
		for (scanf("%d", &x); cur < n && a[cur + 1] < x;)
			++cur;
		lf ans = 0;
		if (a[cur] == x - 1 && a[cur + 1] == x)
			ans = PI;
		else if (a[cur] == x - 1 || a[cur + 1] == x)
			ans = PI / 2;
		else
		{
			if (cur < n)
				ans = max(ans, atan2(1, a[cur + 1] - x));
			if (cur > 0)
				ans = max(ans, atan2(1, x - a[cur] - 1));
			for (int pl = cur, pr = cur + 1;;)
			{
				if (1 > pl || pr > n || a[pr] - a[pl] > min(a[cur + 1] - x, x - a[cur] - 1) * 4 + 20)
					break;
				int dis1 = a[pr] - x, dis2 = x - a[pl] - 1;
				if (abs(dis1 - dis2) < 2)
				{
					ans = max(ans, atan2(1, 2 * max(dis1, dis2)));
					break;
				}
				dis1 < dis2 ? ++pr : --pl;
			}
		}
		printf("%.9lf\n", ans);
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef double lf;
const lf PI = acos(-1);
const int N = 2e5 + 9;
int n, d, m, x, cur, a[N];
int main()
{
	scanf("%d%d", &n, &d);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &a[i]);
	for (scanf("%d", &m); m--;)
	{
		for (scanf("%d", &x); cur < n && a[cur + 1] < x;)
			++cur;
		lf ans = 0;
		if (a[cur] == x - 1 && a[cur + 1] == x)
			ans = PI;
		else if (a[cur] == x - 1 || a[cur + 1] == x)
			ans = PI / 2;
		else
		{
			if (cur < n)
				ans = max(ans, atan2(1, a[cur + 1] - x));
			if (cur > 0)
				ans = max(ans, atan2(1, x - a[cur] - 1));
			for (int pl = cur, pr = cur + 1;;)
			{
				if (1 > pl || pr > n || a[pr] - a[pl] > min(a[cur + 1] - x, x - a[cur] - 1) * 4 + 20)
					break;
				int dis1 = a[pr] - x, dis2 = x - a[pl] - 1;
				if (abs(dis1 - dis2) < 2)
				{
					ans = max(ans, atan2(1, 2 * max(dis1, dis2)));
					break;
				}
				dis1 < dis2 ? ++pr : --pl;
			}
		}
		printf("%.10lf\n", ans);
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef double lf;
const int N = 2e5 + 9;
lf PI = acos(-1), ans;
int n, d, m, x, cur, a[N];
int main()
{
	scanf("%d%d", &n, &d);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &a[i]);
	for (scanf("%d", &m); m--; printf("%.12lf\n", ans))
	{
		for (scanf("%d", &x); cur < n && a[cur + 1] < x;)
			++cur;
		if (a[cur] == x - 1 && a[cur + 1] == x)
			ans = PI;
		else if (a[cur] == x - 1 || a[cur + 1] == x)
			ans = PI / 2;
		else
		{
			ans = 0;
			if (cur < n)
				ans = max(ans, atan2(1, a[cur + 1] - x));
			if (cur)
				ans = max(ans, atan2(1, x - a[cur] - 1));
			for (int pl = cur, pr = cur + 1, d = min(a[cur + 1] - x, x - a[cur] - 1) * 4 + 20;;)
			{
				if (1 > pl || pr > n || a[pr] - a[pl] > d)
					break;
				int dis1 = a[pr] - x, dis2 = x - a[pl] - 1;
				if (abs(dis1 - dis2) < 2)
				{
					ans = max(ans, atan2(1, 2 * max(dis1, dis2)));
					break;
				}
				dis1 < dis2 ? ++pr : --pl;
			}
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
double PI = acos(-1), ans;
int n, d, m, x, cur, dl, dr, a[N];
int main()
{
	scanf("%d%d", &n, &d);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &a[i]);
	for (scanf("%d", &m); m--; printf("%.9lf\n", ans))
	{
		for (scanf("%d", &x); cur < n && a[cur + 1] < x;)
			++cur;
		if (a[cur] == x - 1 && a[cur + 1] == x)
			ans = PI;
		else if (a[cur] == x - 1 || a[cur + 1] == x)
			ans = PI / 2;
		else
		{
			ans = 0;
			if (cur)
				ans = max(ans, atan2(1, dl = x - a[cur] - 1));
			if (cur < n)
				ans = max(ans, atan2(1, dr = a[cur + 1] - x));
			for (int pl = cur, pr = cur + 1, d = min(dl, dr) * 4 + 20; pl && pr <= n && a[pr] - a[pl] <= d; dr < dl ? ++pr : --pl)
			{
				dl = x - a[pl] - 1, dr = a[pr] - x;
				if (abs(dl - dr) < 2)
				{
					ans = max(ans, 2 * atan2(1, max(dl, dr)));
					break;
				}
			}
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    while (m--) {
        int x; cin >> x;
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            static bitset<7100> f, g;
            f.reset(), g.reset();
            for (int i = k; i < k + 7100 && i < n && a[i] - x < 7100; ++i) {
                f[a[i] - x] = 1;
            }
            for (int i = k - 1; i > k - 7100 && i >= 0 && x - a[i] - 1 < 7100; --i) {
                g[x - a[i] - 1] = 1;
            }
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 40) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 7100) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 7100) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    vi que(m);
    FOR(i, 0, m) cin >> que[i];
    std::vector<bitset<8000>> gs(m);
    bitset<8000> bt;
    int ptr = n - 1;
    FORd(i, m, 0) {
        if (i + 1 < m) bt <<= que[i + 1] - que[i];
        while (0 <= ptr && que[i] < a[ptr]) {
            if (a[ptr] - que[i] < 8000) {
                bt[a[ptr] - que[i]] = 1;
            }
            ptr--;
        }
        gs[i] = bt;
    }
    bt.reset();
    ptr = 0;
    FOR(i, 0, m) {
        if (i) bt <<= que[i] - que[i - 1];
        while (ptr < n && a[ptr] < que[i]) {
            if (que[i] - a[ptr] < 8000) {
                bt[que[i] - a[ptr] - 1] = 1;
            }
            ptr++;
        }
        int x = que[i];
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            auto& f = bt;
            auto& g = gs[i];
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 40) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    vi que(m);
    FOR(i, 0, m) cin >> que[i];
    std::vector<bitset<8000>> fs(m), gs(m);
    bitset<8000> bt;
    int ptr = 0;
    FOR(i, 0, m) {
        if (i) bt <<= que[i] - que[i - 1];
        while (ptr < n && a[ptr] < que[i]) {
            if (que[i] - a[ptr] < 8000) {
                bt[que[i] - a[ptr] - 1] = 1;
            }
            ptr++;
        }
        fs[i] = bt;
    }
    bt.reset();
    ptr = n - 1;
    FORd(i, m, 0) {
        if (i + 1 < m) bt <<= que[i + 1] - que[i];
        while (0 <= ptr && que[i] < a[ptr]) {
            if (a[ptr] - que[i] < 8000) {
                bt[a[ptr] - que[i]] = 1;
            }
            ptr--;
        }
        gs[i] = bt;
    }
    FOR(i, 0, m) {
        int x = que[i];
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            auto& f = fs[i];
            auto& g = gs[i];
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 40) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    while (m--) {
        int x; cin >> x;
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            static bitset<7000> f, g;
            f.reset(), g.reset();
            for (int i = k; i < k + 7000 && i < n && a[i] - x < 7000; ++i) {
                f[a[i] - x] = 1;
            }
            for (int i = k - 1; i > k - 7000 && i >= 0 && x - a[i] - 1 < 7000; --i) {
                g[x - a[i] - 1] = 1;
            }
            static vector<double> dp(7005, -1);
            auto func = [&] (int d) {
                double& res = dp[d];
                if (res != -1) return res;
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 100) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return res = (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 7000) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 7000) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    while (m--) {
        int x; cin >> x;
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            static bitset<7100> f, g;
            f.reset(), g.reset();
            for (int i = k; i < k + 7100 && i < n && a[i] - x < 7100; ++i) {
                f[a[i] - x] = 1;
            }
            for (int i = k - 1; i > k - 7100 && i >= 0 && x - a[i] - 1 < 7100; --i) {
                g[x - a[i] - 1] = 1;
            }
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 40) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 7100) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 7100) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    static const int magic = 7000;
    int n, d; cin >> n >> d;
    vi a(n);
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    vi que(m);
    FOR(i, 0, m) cin >> que[i];
    std::vector<bitset<magic>> gs(m);
    bitset<magic> bt;
    int ptr = n - 1;
    FORd(i, m, 0) {
        if (i + 1 < m) bt <<= que[i + 1] - que[i];
        while (0 <= ptr && que[i] < a[ptr]) {
            if (a[ptr] - que[i] < magic) {
                bt[a[ptr] - que[i]] = 1;
            }
            ptr--;
        }
        gs[i] = bt;
    }
    bt.reset();
    ptr = 0;
    FOR(i, 0, m) {
        if (i) bt <<= que[i] - que[i - 1];
        while (ptr < n && a[ptr] < que[i]) {
            if (que[i] - a[ptr] < magic) {
                bt[que[i] - a[ptr] - 1] = 1;
            }
            ptr++;
        }
        int x = que[i];
        int k = lower_bound(all(a), x) - a.begin();
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            auto& f = bt;
            auto& g = gs[i];
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 40) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != magic) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != magic) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    int n, d; cin >> n >> d;
    static int a[234567];
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    while (m--) {
        int x; cin >> x;
        int k = lower_bound(a, a + n, x) - a;
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            static bitset<8000> f, g;
            f.reset(), g.reset();
            for (int i = k; i < k + 8000 && i < n && a[i] - x < 8000; ++i) {
                f[a[i] - x] = 1;
            }
            for (int i = k - 1; i > k - 8000 && i >= 0 && x - a[i] - 1 < 8000; --i) {
                g[x - a[i] - 1] = 1;
            }
            auto func = [&] (int d) {
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 50) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != 8000) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); ++it)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int) 1e9 + 23111992;
const ll LINF = (ll) 1e18 + 23111992;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int chkmin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int chkmax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ull isqrt(ull k) {ull r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() {return abs((int) mt());}
#define db(x) cerr << #x << " = " << (x) << " ";
#define endln cerr << "\n";

#define EPS 1e-9
struct point_t {
    double x, y;
    point_t() : x(0), y(0) {}
    point_t(double x, double y) : x(x), y(y) {}
    point_t(const point_t& p) : x(p.x), y(p.y) {}
    int operator < (const point_t& rhs) const {return make_pair(y, x) < make_pair(rhs.y, rhs.x);}
    int operator == (const point_t& rhs) const {return make_pair(y, x) == make_pair(rhs.y, rhs.x);}
    point_t operator + (const point_t& p) const {return point_t(x + p.x, y + p.y);}
    point_t operator - (const point_t& p) const {return point_t(x - p.x, y - p.y);}
    point_t operator * (double c) const {return point_t(x * c, y * c);}
    point_t operator / (double c) const {return point_t(x / c, y / c);}
};
double cross(point_t p, point_t q) {return p.x * q.y - p.y * q.x;}
double area(point_t a, point_t b, point_t c) {return fabs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;}
double area2(point_t a, point_t b, point_t c) {return cross(a, b) + cross(b, c) + cross(c, a);}
double dot(point_t p, point_t q) {return p.x * q.x + p.y * q.y;}
double dist(point_t p, point_t q) {return sqrt(dot(p - q, p - q));}
double dist2(point_t p, point_t q) {return dot(p - q, p - q);}
point_t RotateCCW90(point_t p) {return point_t(-p.y, p.x);}
point_t RotateCW90(point_t p) {return point_t(p.y, -p.x);}
point_t RotateCCW(point_t p, double t) {return point_t(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));}
int sign(double x) {return x < -EPS ? -1 : x > EPS;}
int sign(double x, double y) {return sign(x - y);}
ostream& operator << (ostream& os, const point_t& p) {
    os << "(" << p.x << "," << p.y << ")";
    return os;
}

void chemthan() {
    static const int magic = 7000;
    int n, d; cin >> n >> d;
    vi a(n);
    FOR(i, 0, n) cin >> a[i];
    int m; cin >> m;
    vi que(m);
    FOR(i, 0, m) cin >> que[i];
    std::vector<bitset<magic>> gs(m);
    bitset<magic> bt;
    int ptr = n - 1;
    FORd(i, m, 0) {
        if (i + 1 < m) bt <<= que[i + 1] - que[i];
        while (0 <= ptr && que[i] < a[ptr]) {
            if (a[ptr] - que[i] < magic) {
                bt[a[ptr] - que[i]] = 1;
            }
            ptr--;
        }
        gs[i] = bt;
    }
    bt.reset();
    ptr = 0;
    FOR(i, 0, m) {
        if (i) bt <<= que[i] - que[i - 1];
        while (ptr < n && a[ptr] < que[i]) {
            if (que[i] - a[ptr] < magic) {
                bt[que[i] - a[ptr] - 1] = 1;
            }
            ptr++;
        }
        int x = que[i];
        int k = lower_bound(all(a), x) - a.begin();
        if (k < n && a[k] == x) {
            if (k && a[k - 1] == x - 1) {
                cout << prec(9) << PI << "\n";
            }
            else {
                cout << prec(9) << PI / 2 << "\n";
            }
            continue;
        }
        if (k == 0) {
            cout << prec(9) << atan(1.0 / (a[k] - x)) << "\n";
        }
        else if (k == n) {
            if (x == a[n - 1] + 1) {
                cout << prec(9) << PI / 2 << "\n";
            }
            else {
                cout << prec(9) << atan(1.0 / (x - a[n - 1] - 1)) << "\n";
            }
        }
        else {
            int e = min(a[k] - x, x - a[k - 1] - 1);
            double res = e ? atan(1.0 / e) : PI / 2;
            auto& f = bt;
            auto& g = gs[i];
            static vector<double> dp(magic + 5, -1);
            auto func = [&] (int d) {
                double& res = dp[d];
                if (res != -1) return res;
                point_t p(d, -1);
                double l = 0, r = PI / 2;
                FOR(it, 0, 100) {
                    double m = (l + r) / 2;
                    point_t q = RotateCCW(p, m);
                    if (q.y < 1) {
                        l = m;
                    }
                    else {
                        r = m;
                    }
                }
                return res = (l + r) / 2;
            };
            int t = (f & g)._Find_first();
            if (t != -1) {
                chkmax(res, (double) atan(1.0 / t) * 2);
            }
            t = (f & (g << 1))._Find_first();
            if (t != magic) {
                chkmax(res, func(t));
            }
            t = ((f << 1) & g)._Find_first();
            if (t != magic) {
                chkmax(res, func(t));
            }
            cout << prec(9) << res << "\n";
        }
    }
}

int main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0), cin.tie(0);
    if (argc > 1) {
        assert(freopen(argv[1], "r", stdin));
    }
    if (argc > 2) {
        assert(freopen(argv[2], "wb", stdout));
    }
    chemthan();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}