#pragma GCC optimize ("03,unroll-loops")
//#pragma GCC target ("avx,avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define foru(i, x, n) for (int i = x; i < n; i++)
#define ford(i, x, n) for (int i = x; i >= n; i--)
#define forn(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define ft first
#define sd second
#define elif else if
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

template <typename T, typename Y>
istream& operator>> (istream& in, pair<T, Y>& a) {
    in >> a.first >> a.second;
    return in;
}

template <typename T>
istream& operator>> (istream& in, vector<T>& a) {
    forn(i, a.size())
        in >> a[i];
    return in;
}

template<typename T>
ostream& operator<< (ostream& out, vector<T>& a) {
    out << a[0];
    foru(i, 1, a.size())
        out << ' ' << a[i];
    out << '\n';
    return out;
}

const int MAX=1e9+1;
const double EPS = 1e-9;

void solve() {
    int n, m;
    double r;
    cin >> n >> m >> r;
    vector<int> q(m), q2(m);
    vector<pair<int, int> > d(n+1);
    map<int, double> x;
    d[0] = {0, 0};
    x[0] = 0;
    forn(i, n) {
        cin >> d[i+1];
    }
    forn(i, m) {
        cin >> q[i];
        q2[i] = q[i];
    }
    sort(q2.begin(), q2.end());
    sort(d.begin(), d.end());
    int i = 1, iq = 0;
    while (i < n+1 && iq < m) {
        while (q2[iq] < d[i].first) {
            x[q2[iq]] = x[d[i-1].first] * pow(1 - r, q2[iq] - d[i-1].first);
            iq++;
        }
        x[d[i].first] = x[d[i-1].first] * pow(1 - r, d[i].first - d[i-1].first) + d[i].second*r;
        i++;
    }
    while (iq < m) {
        x[q2[iq]] = x[d[i-1].first] * pow(1 - r, q2[iq] - d[i-1].first);
        iq++;
    }
    forn(i, m)
        cout << fixed << setprecision(6) << x[q[i]] << ' ';

}

signed main()
{
    fast;
    int t = 1;
    //cin >> t;
    while (t--)
        solve();
    return 0;
}


