#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define pb push_back
#define ss second
#define ff first
#define vt vector
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, int> pdi;
const ll inf = 1e16;
const int mod = 1e9+7;
const int maxn = 2e5 + 12;
void solve() {
	int n, m;
	double r;
	cin >> n >> m >> r;
	double out[m];
	double ans = 0;
	pair<pair<int, int>, int> a[n + m];
	for(int i = 0; i < n; i++){
		cin >> a[i].ff.ff >> a[i].ss;
		a[i].ff.ss = 0;
	}
	for(int i = 0; i < m; i++) {
		cin >> a[i + n].ff.ff;
		a[i + n].ss = i;
		a[i + n].ff.ss = 1;
	}
	sort(a, a + n + m);
	for(int i = 0, now = 0; i < n + m; i++) {
		double s = 1.0 - r;
		int x = a[i].ff.ff - now;
		now = a[i].ff.ff;
		while(x) {
			if(x & 1)ans = ans * s;
			x >>= 1;
			s *= s;
		}
		if(a[i].ff.ss == 0) {
			ans += a[i].ss * r;
		}
		else {
			out[a[i].ss] = ans;
		}
		//cout << ans << ' ';
	}
	for(int i = 0; i < m; i++) {
		cout << fixed << setprecision(7) << out[i] << '\n';
	}
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int times = 1;
	//cin >> times;
	for(int i = 1; i <= times; i++) {
		solve();
	}
	return 0;
}
