#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    vector<pair<long long, long long>> days(n);
    for (auto &[x, y]: days) {
        cin >> x >> y;
    }
    vector<pair<long long, int>> q(m);
    int ind = 0;
    for (auto &[x, y]: q) {
        cin >> x;
        y = ind;
        ind++;
    }
    sort(days.begin(), days.end());
    sort(q.begin(), q.end());
    long long current_day = 1;
    double current_w = 0;
    int i = 0, j = 0;
    vector<double> ans(m);
    while (j < q.size()) {
        if (i < days.size() && days[i].first <= q[j].first) {
            current_w *= pow((1 - r), days[i].first - current_day);
            current_w += r * (double)days[i].second;
            current_day = days[i].first;
            i++;
        }
        else if (current_day <= q[j].first) {
            current_w *= pow((1 - r), q[j].first - current_day);
            ans[q[j].second] = current_w;
            current_day = q[j].first;
            j++;
        }
    }
    for (auto& x : ans) {
    cout << fixed << setprecision(10) << x << " ";
    }
}