100分~
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, m, k;
int sum[N], a[N];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin >> n >> m >> k;
int x, y;
for (int i = 0; i < n; i++)
{
cin >> x >> y;
if (x < k)
continue;
int l = max(x - y - k + 1, 0), r = max(0, x - k);
//cout << "区间:" << l << " " << r << endl;
r = min(N, r);
sum[l] += 1;
sum[r + 1] -= 1;
}
a[0] = sum[0];
for (int i = 1; i < N; i++)
a[i] = a[i - 1] + sum[i];
// for (int i = 0; i < y; i++)
// cout << a[i] << " ";
// cout << endl;
while (m--)
{
cin >> x;
cout << a[x] << endl;
}
return 0;
}