#include <iostream>
#include <vector>
#include <unordered_map>
#include <iomanip>

using namespace std;

long long n, m;
float r;
vector<long long> vec;
unordered_map<long long, long long> map;

float f(long long  day) {
    if (day == 0) {
        return 0;
    } else {
        if (map.count(day)) {
            return f(day - 1) * (1 - r) + map[day] * r;
        } else {
            return f(day - 1) * (1 - r);
        }
    }
}

void setList() {
    while (m > 0) {
        m--;
        long long d;
        cin >> d;
        vec.push_back(d);
    }
}

void setMap() {
    while (n > 0) {
        n--;
        long long d, w;
        cin >> d >> w;
        map[d] = w;
    }
}

void setN() {
    cin >> n;
}

void setM() {
    cin >> m;
}

void setR() {
    cin >> r;
}

int main() {
    setN();
    setM();
    setR();
    setMap();
    setList();
    for (long long i : vec) {
        cout << fixed << setprecision(7) << f(i) << " ";
    }
    return 0;
}