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

#define rep(i,n) for(int i = 0; i < n; i++)
#define Rep(i,n) for(int i = 1; i <= n; i++)
#define sz(a) int(a.size())
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fin(a) { cout << a << endl; return 0; }
#define debug(a) { cerr << #a << ": " << a << endl; }
#define endl '\n'
#define fi first
#define se second
using lint = long long;
using ld = long double;
using P = pair<int,int>;
using Pl = pair<lint,lint>;
template<class T> using V = vector<T>;
template<class T> using priq     = priority_queue<T>;
template<class T> using priq_inv = priority_queue<T, vector<T>, greater<T>>;
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
template<class T> T ceil(const T &a, const T &b) { return ((a)+(b)-1)/b; }
template<class T> bool chmin(T &a, T b) { if(a > b) { a = b; return 1; } return 0; }
template<class T> bool chmax(T &a, T b) { if(a < b) { a = b; return 1; } return 0; }
template<class T> void YesorNo(T x) { printf(x ? "Yes\n" : "No\n"); }
struct INF { template<class T> operator T() { return numeric_limits<T>::max() / 2; } } INF;

template<class T, class U> istream& operator>>(istream &in, pair<T,U> &p) {
    return in >> p.first >> p.second;
}
template<class T, class U> ostream& operator<<(ostream &out, const pair<T,U> &p) {
    return out << '{' << p.first << ',' << p.second << '}';
}
template<class T> istream& operator>>(istream &in, vector<T> &v) {
    for(auto &&e : v) in >> e;
    return in;
}
template<class T> ostream& operator<<(ostream &out, const vector<T> &v) {
    for(const auto &e : v) out << e << ' ';
    return out;
}

/*----------------------------------------------------------------------------------------------------*/


int main(){
    int n, m, q;
    cin >> n >> m >> q;
    V<P> bs(n);
    V<int> xs(m);
    cin >> bs >> xs;
    sort(all(bs));

    rep(qi,q) {
        int l, r;
        cin >> l >> r;
        l--; r--;
        V<int> canuse;
        rep(i,m) {
            if(l <= i && i <= r) continue;
            canuse.push_back(xs[i]);
        }
        sort(all(canuse));
        // cout << canuse << endl;
        int ans = 0;
        priority_queue<int> pq;
        int idx = 0;
        for(int hako : canuse) {
            while(true) {
                if(idx == n) break;
                auto [sz, val] = bs[idx];
                if(sz > hako) break;
                pq.push(val);
                idx++;
            }
            if(sz(pq)) {
                int top = pq.top(); pq.pop();
                ans += top;
            }
        }
        cout << ans << endl;
    }
}
#include <bits/stdc++.h>
#define PI pair<int,int>
using namespace std;
const int maxm=5e1+5;
PI e[maxm];
PI ee[maxm];
int n,m,q;
void solve(){
    cin>>n>>m>>q;
    for(int i=1;i<=n;i++){
        int x,y;cin>>x>>y;
        e[i]={x,y};
    }
    for(int i=1;i<=m;i++){
        int x;cin>>x;
        ee[i]={x,i};
    }
    sort(e+1,e+1+n);
    sort(ee+1,ee+1+m);
    while(q--){
        int l,r;cin>>l>>r;
        priority_queue<int> q;
        int ans=0;
        int j=1;
        for(int i=1;i<=m;i++){
            if(ee[i].second>=l&&ee[i].second<=r) continue;
            while(j<=n&&e[j].first<=ee[i].first){
                q.push(e[j].second);
                j++;
            }
            if(q.size()){
                ans+=q.top();q.pop();
            }
        }
        cout<<ans<<endl;
    }
}
signed main(){
    ios::sync_with_stdio(0);
    solve();
    return 0;
}