#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i = (begin); i < (end); i++)
#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define SZ(x) ((int)((x).size()))
#define LE(vec) vec[vec.size()-1]
#define TSTS int t; cin >> t; while(t--)solve()

const int INF = 1e9;
const long long LINF = 1e18;
const long double PI = asin(1)/2;
const int MOD = 1e9+7;

using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef map<int, int> mii;
typedef long long ll;
typedef long double ld;

void setIO()
{
    FAST_IO;
}

void setIO (string s) {
    setIO();
 	freopen((s+".in").c_str(),"r",stdin);
 	freopen((s+".out").c_str(),"w",stdout);
}

const int N = 50;

int n, m, q;
vector<pii> inf;
int x[N];

int fnd(int l, int r)
{
    int tot = 0;
    set<int> used;
    vector<pii> a;
    FOR(i, 0, l-1)
    {
        a.PB(MP(x[i], i));
    }

    FOR(i, r, m)
    {
        a.PB(MP(x[i], i));
    }

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

    for(auto it : a)
    {
        int mx = -1, mxin = 0;
        FOR(j, 0, SZ(inf))
        {
            if(!used.count(j))
            {
                if(inf[j].F<=it.F)
                {
                    if(mx<inf[j].S)
                    {
                        mx = inf[j].S;
                        mxin = j;
                    }
                }
            }
        }
        if(mx!=-1)
        {
            used.insert(mxin);
            tot += mx;
        }
    }

    return tot;
}

int main()
{
    setIO();
    cin >> n >> m >> q;
    FOR(i, 0, n)
    {
        int a, b;
        cin >> a >> b;
        inf.PB(MP(a, b));
    }

    FOR(i, 0, m)
    {
        cin >> x[i];
    }

    FOR(i, 0, q)
    {
        int l, r;
        cin >> l >> r;
        cout << fnd(l, r) << '\n';
    }
}

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

ll getmax(vector<int> box, vector<pair<int, int>> &bag, int n){
    sort(box.begin(), box.end());
    ll result=0;
    vector<bool> visit (n, 0);
    for(int i=0; i<box.size();i++){
        for(int j=0; j<n; j++){
            //cout<<bag[j].second<<"   "<<box[i];
            if(!visit[j]&&bag[j].second<=box[i]){
                //cout<<"Hello";
                visit[j]=1;
                result+=bag[j].first;
                break;
            }
        }
    }
    return result;
}


int main(){
    int N, M, Q;
    cin>>N>>M>>Q;
    vector<pair<int,int>> bag;
    for(int i=0; i<N; i++){
        int first, second;
        cin>>first>>second;
        bag.push_back({second, first});
    }
    vector<int> box;
    for(int i=0; i<M; i++){
        int a; cin>>a; box.push_back(a);
    }
    sort(bag.rbegin(), bag.rend());
    for (int i=0; i<Q; i++){
        int L, R;
        cin>>L>>R; --L; --R;
        //cout<<"---------------------";
        vector<int> validbox;
        for(int j=0; j<M; j++){
            if(j<L||j>R) validbox.push_back(box[j]);
        }
        cout<<getmax(validbox, bag, N)<<endl;
        }

}