#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double lf;

// #define int ll
#define FOR(i, f, t) for (int i = (f), ed##i = (t); i <= ed##i; ++i)
#define ROF(i, t, f) for (int i = (t), ed##i = (f); i >= ed##i; --i)
#define DBG(x) (cerr << "(dbg) " << #x " = " << (x) << '\n')
#define FIO(x) (freopen(x ".in", "r", stdin), freopen(x ".out", "w", stdout))
#define y1 y1__

// clang-format off
struct Reader{template<class T>Reader&operator()(T&x){x=0;T f=1;char ch=getchar();while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();x*=f;return*this;}ll operator()(){ll x;operator()(x);return x;}Reader&operator()(char*x){scanf("%s",x);return*this;}template<class T>Reader&operator()(vector<T>&v,int n){T x;FOR(i,1,n){operator()(x),v.push_back(x);}return*this;}template<class T>Reader&operator()(T*x,int n,int st=1){FOR(i,st,n){operator()(x[i]);}return*this;}}in;template<class T>T Abs(const T&a){return a>0?a:-a;}template<class T>void Up(T&a,const T&b){b>a&&(a=b);}template<class T>void Down(T&a,const T&b){b<a&&(a=b);}template<class T,size_t E>void Fill(T(&a)[E],const int&x){memset(a,x,E*sizeof(*a));}ll Pow(ll a,ll b,const ll&m){ll res=1;a%=m;while(b>0){if(b&1)res=res*a%m;a=a*a%m,b>>=1;}return res;}template<class T>T Gcd(T a,T b){T t;while(b!=0)t=a%b,a=b,b=t;return a;}
// clang-format on

const int N = 2e6 + 5;

typedef pair<int, int> pii;

int n, m, q, x[N], rn[N];
pii a[N];
bitset<N> ban;

void Solve(int l, int r) {
  ban.reset();
  int ans = 0;
  FOR (i, l, r) { ban[i] = 1; }
  FOR (i, 1, n) {
    FOR (j, 1, m) {
      if (!ban[rn[j]] && x[rn[j]] >= a[i].first) {
        // cerr << "put " << i << " to " << j << '\n';
        ban[rn[j]] = 1;
        ans += a[i].second;
        break;
      }
    }
  }
  // cerr << "end\n";
  cout << ans << '\n';
}

signed main() {
  in(n)(m)(q);
  FOR (i, 1, n) { in(a[i].first)(a[i].second); }
  sort(a + 1, a + 1 + n, [](pii a, pii b) { return a.second > b.second; });
  in(x, m);
  FOR (i, 1, m) { rn[i] = i; }
  sort(rn + 1, rn + 1 + m, [](int a, int b) { return x[a] < x[b]; });
  FOR (_, 1, q) {
    int l = in(), r = in();
    Solve(l, r);
  }
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (int i = a; i < (b); i++)

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    int x[m];
    vector<pair<int, int>> vw(n);
    rep(i, 0, n) {
        int w, v;
        cin >> w >> v;
        vw[i].first = v, vw[i].second = w;
    }
    rep(i, 0, m) cin >> x[i];
    sort(vw.rbegin(), vw.rend());

    auto query = [&](int l, int r) {
        vector<int> tmpm;
        rep(i, 0, m) {
            if (l <= i && i < r) continue;
            tmpm.push_back(x[i]);
        }
        sort(tmpm.begin(), tmpm.end());

        bool conf[n] = { 0 };
        int res = 0;
        for (auto t : tmpm) {
            int maxv = 0;
            rep(i, 0, n) {
                if (vw[i].second > t || conf[i]) continue;
                maxv = max(maxv, vw[i].first);
                conf[i] = true;
                break;
            }
            res += maxv;
        }
        return res;
    };

    rep(i, 0, q) {
        int l, r;
        cin >> l >> r;
        cout << query(l - 1, r) << endl;
    }

}