#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <limits>
#include <cstring>
#define int long long

int const INF = std::numeric_limits<int>::max();
int const NINF = std::numeric_limits<int>::min();
int const N = 50;
int const M = N;

struct Obj {
	int weight;
	int value;
	bool operator<(const Obj& other) const {
		if (value == other.value) {
			return weight < other.weight;
		}
		else {
			return value > other.value;
		}
	}
};

int box[M + 1];
bool vis[M + 1];
Obj bag[N + 1];

signed main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	std::cout.tie(0);	
	
	int n, m, q;
	std::cin >> n >> m >> q;
	
	for (int i = 1; i <= n; i++) {
		std::cin >> bag[i].weight >> bag[i].value;
	}
	std::sort(bag + 1, bag + 1 + n);
	
	for (int i = 1; i <= m; i++) {
		std::cin >> box[i];
	}
	
	for (int i = 1; i <= q; i++) {
		memset(vis, 0, sizeof vis);
		
		int l, r;
		std::cin >> l >> r;
		for (int j = l; j <= r; j++) {
			vis[j] = true;
		}
		
		int ans = 0;
		for (int j = 1; j <= n; j++) {
			int near = INF;
			int pos = 0;
			for (int k = 1; k <= m; k++) {
				if (!vis[k]) {
					if (box[k] >= bag[j].weight && box[k] < near) {
						near = box[k];
						pos = k;
					}
				}
			}
			
			if (near != INF) {
				vis[pos] = true;
				ans += bag[j].value;
			}
		}
		
		std::cout << ans << '\n';
	}
	
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ui MOD = 1E9 + 7;
const double EPS = 1e-9;
#define FOR(i,n) for (int i=0;i<(n);++i)
#define MP make_pair
#define all(a) (a).begin(),(a).end()
#define ODD(x) ( ((x)&1)==0?0:1 )
#define SIGN(x) ( ((x) > 0) - ((x) < 0)  )
#define dbg(x) cerr << #x"= " << x << endl

std::mt19937_64  generator(std::chrono::system_clock::now().time_since_epoch().count());

inline ll powmod(ll a,ll b,ll mod) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll lcm(ll a, ll b) { return a / __gcd(a,b) * b; }


void READ(bool _local){
    ios_base::sync_with_stdio(false); cin.tie(0);
#ifdef _DEBUG
    if (_local)
        freopen ("in.txt", "r", stdin);
#endif
}

int main(){
    READ(1);
    int n,m,q;cin>>n>>m>>q;
    vii bag(n);
    FOR(i,n)cin>>bag[i].first>>bag[i].second;
    sort(all(bag),[](const ii a,const ii b){return a.second>b.second;});
    vii box(m);
    FOR(i,m) {cin>>box[i].first;box[i].second=i;}
    sort(all(box));
    vi used(m);
    while(q--){
        int l,r;cin>>l>>r;
        --l, --r;
        FOR(i,m)
            used[i]= (box[i].second>=l && box[i].second<=r);
        ll ret=0;
        FOR(i,n){
            FOR(j,m){
                if (!used[j] && box[j].first>=bag[i].first){
                    ret += bag[i].second;
                    used[j]=1;
                    break;
                }
            }
        }
        cout << ret << " ";
    }

}
