#include<fstream>
#include<iostream>
#include<sstream>
#include<vector>
#include<stack>
#include<string>
#include<algorithm>
#include<cmath>
#include<unordered_map>
#include<map>
#include<queue>
#include<tuple>
#include<iomanip>
#include<bitset>
#include<stdio.h>
#include<set>
#include<array>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using graph = vector<vector<int>>;
const long long MOD = 1000000007;
const long long INF = 1e18;
using ll = long long;
using P = pair<int,int>;
using matrix = vector<vector<ll>>;

void chmin(int &x,int y){ x = min(x,y); }

int digit(ll x){
  int count = 1;
  while(x/10>0){
    count ++;
    x /= 10;
  }
  return count;
}

bool prime(ll x){
  if(x==1) return false;
  for(ll i=2;i*i<=x;i++){
    if(x%i==0) return false;
  }
  return true;
}

void decom(ll x,map<ll,int> &hatano){
  for(ll i=2;i*i<=x;i++){
    if(x%i==0&&prime(i)){
      while(x%i==0){
      x /= i;
      hatano[i] ++;
    }
    }
  }
  if(x!=1) hatano[x] ++;
}

ll speedpow(ll x,ll y){
  ll res = 1;
  ll test = x;
  for(int i=0;i<31;i++){
    if(y&(1<<i)) res *= test;
    res = res%MOD;
    test = (test*test)%MOD;
  }
  return res;
}

ll combination(ll x,ll y){
  ll test = 1;
  ll test1 = 1;
  for(ll i=0;i<y;i++){
    test = (test*(x-i))%MOD;
    test1 = (test1*(i+1LL))%MOD;
  }
  return (test * speedpow(test1,MOD-2))%MOD ;
}

int euclid(int x,int y){
  if(y==0) return x;
  return euclid(y,x%y);
}

//行列累乗


matrix mul(matrix &a, matrix &b) {
  int p = a.size();
    matrix res(p, vector<long long>(p, 0));
    for(int i = 0; i < p; i++)
        for(int j = 0; j < p; j++)
            for(int k = 0; k < p; k++)
                (res[i][j] += a[i][k] * b[k][j]) %= MOD;
    return res;
}


matrix pow(matrix m, long long k) {
  int p = m.size();
    matrix res(p, vector<long long>(p, 0));
    for(int i = 0; i < p; i++)
        res[i][i] = 1; // 単位行列にする

    while(k > 0) {
        if(k & 1) res = mul(res, m);
        m = mul(m, m);
        k >>= 1;
    }
    return res;
}


int main(){
    int n,m,q;cin >> n >> m >> q;
    int v[n],w[n];
    vector<P> hatano;
    int x[m];
    vector<P> konishi;

    int l[q],r[q];
    rep(i,n){
      cin >> w[i] >> v[i];
      hatano.push_back(make_pair(v[i],w[i]));
    }

    sort(hatano.rbegin(),hatano.rend());
    rep(i,m){
      cin >> x[i];
      konishi.push_back(make_pair(x[i],i));
    }
    sort(konishi.begin(),konishi.end());
    vector<int> ans;

    rep(i,q){
      cin >> l[i] >> r[i];
      l[i] --;r[i] --;
    }
    rep(i,q){
      int test=0;
      vector<bool> check(m,true);
      for(int s=l[i];s<=r[i];s++) check[s] = false;

        rep(j,n){
          rep(k,m){
            if(konishi[k].first>=hatano[j].second&&check[konishi[k].second]){
              test += hatano[j].first;
              check[konishi[k].second] = false;
             // cout << hatano[j].first << endl;
              break;
            }
          }
        }
        ans.push_back(test);
      //  cout << endl;
    }

    for(auto e:ans) cout << e << endl;

  }

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <iomanip>

using namespace std;

typedef long long ll;

int main()
{
	ll n, m, q;
	cin >> n >> m >> q;

	vector<pair<ll, ll>> nimotu(n, pair<ll, ll>());

	for (ll i = 0; i < n; i++) {
		cin >> nimotu[i].second >> nimotu[i].first;
	}
	sort(nimotu.begin(), nimotu.end(), greater<pair<ll, ll>>{});

	vector<ll> x(m);
	for (ll i = 0; i < m; i++) cin >> x[i];

	vector<ll> answer;

	for (ll qq = 0; qq < q; qq++) {
		ll ans = 0;
		ll l, r;
		cin >> l >> r;
		l--; r--;
		vector<ll> boxes;
		for (ll i = 0; i < m; i++) {
			if ((l <= i) && (i <= r)) {

			}
			else {
				boxes.push_back(x[i]);
			}
		}

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

		for (ll i = 0; i < nimotu.size(); i++) {
			for (ll j = 0; j < boxes.size(); j++) {
				if (nimotu[i].second <= boxes[j]) {
					boxes.erase(boxes.begin() + j);
					ans += nimotu[i].first;
					break;
				}
			}
		}

		answer.push_back(ans);
	}

	for (ll i = 0; i < answer.size(); i++) {
		cout << answer[i] << endl;
	}
}
