#include <bits/stdc++.h>
using namespace std;

#define IO          ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int         long long
#define double      long double
#define vi          vector<int>
#define vvi         vector<vi>
#define pii         pair<int, int>
#define vii         vector<pii>
#define endl        '\n'
#define pb          push_back
#define all(v)      (v).begin(), (v).end()
#define rall(v)     (v).rbegin(), (v).rend()
#define mod         1000000007

int n, m, q;

void solve() {
	cin >> n >> m >> q;
	vii bag(n);
	for (auto& it : bag) {
		cin >> it.first >> it.second;
	}
	vi box(m);
	for (auto& it : box) {
		cin >> it;
	}
	sort(all(bag));
	while (q--) {
		int l, r;
		cin >> l >> r;
		l--, r--;
		vi a;
		for (int i = 0; i < m; i++) {
			if (i < l || i > r) 
				a.pb(box[i]);
		}
		sort(all(a));
		priority_queue<int> pq;
		int idx = 0, ans = 0;
		for (auto& it : a) {
			while (idx < n && bag[idx].first <= it)	{
				pq.push(bag[idx].second);
				idx++;
			}
			if (pq.size()) {
				ans += pq.top();
				pq.pop();
			}
		}
		cout << ans << endl;
	}
}

signed main() {
	IO;
	int t = 1;
	// cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
using vec_int = vector<int>;
using P = pair<int,int>;
using T = tuple<int,int,int>;
using ll = long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

int pow_int(int a, int b){
    int result = 1;
    rep(i,b)result*=a;
    return result;
}


signed main(){
    int N, M, Q;cin >> N>>M>>Q;
    vec_int W(N), V(N); rep(i,N)cin>>W.at(i)>>V.at(i);
    vec_int X(M); rep(i,M)cin>>X.at(i);

    rep(q,Q){
        int L, R; cin>>L>>R;

        vec_int box;
        for(int i=0;i<L-1;i++){
            box.push_back(X.at(i));
        }
        for(int i=R;i<M;i++){
            box.push_back(X.at(i));
        }

        sort(box.begin(), box.end());

        set<int> used;
        int ans = 0;
        for(auto size_limit:box){

            int temp_value = 0;
            int temp_index = -1;
            for(int i =0;i<N;i++){
                if(used.count(i))continue;
                if(W.at(i)>size_limit)continue;
                if(V.at(i)>temp_value){
                    temp_value = V.at(i);
                    temp_index = i;
                }
            }
            if(temp_index>=0){
                used.insert(temp_index);
                ans += temp_value;
            }
        }
        cout<<ans<<endl;


    }

    return 0;
}