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

#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()

typedef pair<int,int> P;

signed main(){
  int n,m,q;cin>>n>>m>>q;
  vector<P> v(n);
  REP(i,n)cin>>v[i].first>>v[i].second;
  sort(ALL(v));
  vector<int> x(m);
  REP(i,m)cin>>x[i];
  auto solve=[&](vector<int> &k){
    sort(ALL(k));
    priority_queue<int> que;
    int res=0,now=0;
    for(int p:k){
      while(now<n&&v[now].first<=p)que.push(v[now++].second);
      if(que.size()){
        res+=que.top();
        que.pop();
      }
    }
    return res;
  };
  while(q--){
    int l,r;cin>>l>>r;l--;
    vector<int> k;
    REP(i,m)if(i<l||r<=i)k.push_back(x[i]);
    cout<<solve(k)<<endl;
  }
}

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
#define fst first
#define snd second

void solve(istream &cin, ostream &cout) {
  int n, m, q;
  cin >> n >> m >> q;
  vector<PII> bags(n);
  for (auto &[v, w] : bags)
    cin >> w >> v;
  sort(bags.rbegin(), bags.rend());
  VI boxes(m);
  for (int &box : boxes)
    cin >> box;
  while (q--) {
    int l, r;
    cin >> l >> r;
    l--, r--;
    VI use;
    for (int i = 0; i < m; i++) {
      if (l <= i && i <= r) continue;
      use.push_back(boxes[i]);
    }
    sort(use.begin(), use.end());
    auto heap = bags;
    int tot = 0;
    for (int box : use) {
      for (auto &[v, w] : heap) {
        if (v != 0 && w <= box) {
          tot += v;
          v = 0;
          break;
        }
      }
    }
    cout << tot << '\n';
  }
}


struct DShippingCenter {
  void solve(std::istream &in, std::ostream &out) {
    ::solve(in, out);
  }
};

int main() {
  DShippingCenter solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
