#include <iostream>
#include <stdio.h>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <stack>
#include <utility>
#include <fstream>
//#include <random>
#include <map>
//#include <unordered_map>
#include <cstdlib>
#include <functional>
#include <time.h>
//#include <chrono>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <iostream>
#include <limits>
#include <numeric>
#include <sstream> // std::stringstream
#include <bitset>  // std::bitset<N>
//#include <type_traits>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=b-1;i>=a;i--)
#define ll long long
#define INF 1000000001
#define MOD 1000000007
#define SORT(s) sort(s.begin(), s.end());
#define REVERSE(s) reverse(s.begin(), s.end());
#define SUM(s) accumulate(s.begin(), s.end(), 0LL);
#define P pair<int,int>
#define mp make_pair
#define valid(x,y,h,w) (0<=x&&x<h&&0<=y&&y<w)
//#define int ll
int dx[4] = { 0,1,0,-1 };
int dy[4] = { 1,0,-1,0 };
int ndx[8] = { 0,1,0,-1, 1,1,-1,-1 };
int ndy[8] = { 1,0,-1,0, 1,-1,-1,1 };
double pi = 3.141592653589793;
using namespace std;
int POW(int x, int y) { return int(pow(double(x), double(y))); }
double log(double a, double b) { return log(b) / log(a); }

ll m;
string x;
int s;

ll binary_search_f(ll n) {
	ll res = 0;
	ll a = 1;;
	rrep(i, s) {
		if (i != s - 1) a *= n;
		if (a > 1000000000000000001 || res > 1000000000000000001) {
			return 1000000000000000001;
		}
		if (x[i] - '0' == 0) {
			continue;
		}
		if (a > 1000000000000000001 / (x[i] - '0')) {
			return 1000000000000000001;
		}
		ll res0 = res;
		res += (x[i] - '0') * a;
		if (res < 0 || res - (x[i] - '0') * a != res0) {
			return 1000000000000000001;
		}
	}
	return res;
}
ll f(ll a) {
	//ll cnt = 0;
	if (a <= 1)return a;
	ll x = 1;
	while (binary_search_f(x) < a) {
		x *= 2;
		//cnt++;
	}
	ll top = x + 1;
	ll bot = x / 2;
	ll c = (top + bot) / 2;

	while (1) {
		//cnt++;
		if (c == 0 && binary_search_f(c) > a) {
			return -1;
		}
		if (binary_search_f(c) <= a && binary_search_f(c + 1) > a) {
			//cout << cnt << endl;
			return c;
		}
		else if (binary_search_f(c) > a) {
			top = c;
			c = (c + bot) / 2;
		}
		else {
			bot = c;
			c = (c + top) / 2;
		}
	}
}

int main() {
	int n, m, q;
	cin >> n >> m >> q;
	vector<int> w(n), v(n), x(m), l(q), r(q);
	vector<P> vw(n);
	rep(i, n) {
		cin >> w[i] >> v[i];
		vw[i] = mp(v[i], w[i]);
	}
	rep(i, m) {
		cin >> x[i];
	}
	rep(i, q) {
		cin >> l[i] >> r[i];
		l[i]--; r[i]--;
	}

	SORT(vw);
	REVERSE(vw);

	rep(i, q) {
		vector<int> y, use;
		rep(j, m) {
			if (j < l[i] || r[i] < j) {
				y.push_back(x[j]);
				use.push_back(0);
			}
		}
		SORT(y);
		ll ans = 0;
		rep(j, n) {
			int W = vw[j].second;
			int V = vw[j].first;
			rep(k, y.size()) {
				if (use[k] == 0 && y[k] >= W) {
					use[k] = 1;
					ans += V;
					break;
				}
			}
		}
		cout << ans << endl;
	}
}



#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
#define REPi(i, a, b) for(int i=int(a); i<int(b); i++)
#define MEMS(a,b) memset(a,b,sizeof(a))
#define mp make_pair
#define MOD(a, m) ((a % m + m) % m)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll MOD = 1e9+7;

int main(){
    ll N, M, Q;
    cin >> N >> M >> Q;
    vector<ll> X(M);
    using P = pair<ll, ll>;
    vector<P> WV(N);
    REP(i,N){
        ll w, v;
        cin >> w >> v;
        WV[i] = P(w, v);
    }
    sort(WV.begin(), WV.end());
    REP(i,M){
        ll x;
        cin >> x;
        X[i] = x;
    }

    while(Q--){
        ll L, R;
        cin >> L >> R;
        L--, R--;
        priority_queue<ll, vector<ll>, greater<ll>> Y;
        REP(i,L)
            Y.push(X[i]);
        REPi(i,R+1,M)
            Y.push(X[i]);

        priority_queue<ll> V;
        ll idx = 0;
        ll ans = 0;
        while(!Y.empty()){
            auto y = Y.top(); Y.pop();

            while(idx < N){
                auto [w, v] = WV[idx];
                if(w > y) break;
                V.push(v);
                idx++;
            }

            if(V.empty()) continue;
            auto v = V.top();
            V.pop();
            ans += v;
        }

        cout << ans << endl;
    }
    return 0;
}
