#include <bits/stdc++.h>

#define _FORTIFY_SOURCE 0
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")

using namespace std;

typedef long long ll;
typedef long double ld;
#define int ld
#define double ld

#ifdef LOCAL
#   define dbg(x) cout << #x " = " << (x) << '\n';
#   define dbgf printf
#else
#   define dbg(x)
#   define dbgf(...)
#endif

#define all(x) std::begin(x), std::end(x)
#define rall(x) std::rbegin(x), std::rend(x)

template<typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> &p) {
    return out << p.first << ' ' << p.second;
}

template<typename T1, typename T2>
istream &operator>>(istream &in, pair<T1, T2> &p) {
    return in >> p.first >> p.second;
}

const auto boostIO = []() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout << fixed;
    cout.precision(16);
    return 0;
} ();

double bin_pow(double x, int power) {
    if (power == 0) {
        return 1;
    }
    if ((ll)power % 2) {
        return x * bin_pow(x, power - 1);
    }
    double res = bin_pow(x, power / 2);
    return res * res;
}

void solve() {
    int n,m;
    cin >> n >> m;
    double r;
    cin >> r;
    vector<pair<int, double>> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(all(a));
    vector<pair<int, double>> ans;
    ans.emplace_back(0, 0);
    double x = 0;
    for (int i = 0; i < n; i++) {
        x = bin_pow((1. - r), (i ? a[i].first - a[i - 1].first : 0)) * x + r * a[i].second;
//        cout << i.first << ' ' << x << '\n';
        ans.emplace_back(a[i].first, x);
    }
    sort(all(ans));
    for (int i = 0; i < m; i++) {
        int q;
        cin >> q;
        int lx = 0, rx = ans.size();
        while (rx - lx > 1) {
            int mx = lx + (rx - lx) / 2;
            if (ans[mx].first > q) {
                rx = mx;
            }
            else {
                lx = mx;
            }
        }
//        cout << ans[lx].second << '\n';
        cout << ans[lx].second * bin_pow(1 - r, q - ans[lx].first) << '\n';
    }
}

signed main() {

    solve();

    return 0;
}