#include <bits/stdc++.h>
#define rep(i,N) for(int i=0; i<(N); i++)
using namespace std;

int main() {
  int N,M,Q;
  cin >> N >> M >> Q;
  vector<pair<int,int>> a(N);
  rep(i,N) cin >> a.at(i).second >> a.at(i).first;
  vector<int> b(M),k(M);
  rep(i,M){
    cin >> b.at(i);
    k.at(i) = b.at(i);
  }
  vector<pair<int,int>> c(Q);
  rep(i,Q) cin >> c.at(i).first >> c.at(i).second;
  
  sort(a.rbegin(),a.rend());
  rep(i,Q){
    for(int j=c.at(i).first; j<=c.at(i).second; j++) k.at(j-1) = 0;
    int ans=0;
    
    sort(k.begin(),k.end());
    for(int j=0; j<N; j++){
      rep(l,M){
        if(a.at(j).second <= k.at(l)){
          ans += a.at(j).first;
          k.at(l) = 0;
          break;
        }
        else continue;
      }
    }
    cout << ans << endl;
    rep(j,M) k.at(j) = b.at(j);
    
  }
}
#include <bits/stdc++.h>
 
typedef long long ll;
typedef long double ld;
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define PRECISION cout << fixed << setprecision(20);
 
using namespace std;

void solve() {
    int n, m, q;
    cin >> n >> m >> q;

    vector<array<int, 2>> arr(n);
    for (auto &a: arr) cin >> a[0] >> a[1];

    sort(arr.begin(), arr.end(), [&](array<int, 2> a, array<int, 2> b) {
        return pair<int, int>{a[1], -a[0]} > pair<int, int>{b[1], -b[0]};
    });

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

    while (q--) {
        int l, r;
        cin >> l >> r;
        l--; r--;
        vector<int> ok(m, 1);
        int ans = 0;
        for (auto &a: arr) {
            int ind = -1;
            for (int i = 0; i < m; i++) {
                if (i >= l && i <= r) continue;
                if (x[i] < a[0]) continue;
                if (!ok[i]) continue;
                if (ind == -1 || x[i] < x[ind]) ind = i;
            }
            if (ind != -1) {
                ok[ind] = 0;
                ans += a[1];
            }
        }
        cout << ans << '\n';
    }


}

int main() {
    FASTIO;
    PRECISION;

    int t = 1;
    // cin >> t;

    for (int i = 1; i <= t; i++) {
        solve();
    }
}