#include <bits/stdc++.h>

using namespace std;

#define int long long int
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n";
#define rep(i, a, b) for (int i=a; i<b; i++)
#define pre(i, a, b) for (int i=a; i>=b; i--)

const int MAX_N = 1e5+5;
const int MOD = 1e9 + 7;
const int INF = 1e9;

#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>

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

	vector<pii> a(n);
	int x,y;

	rep(i,0,n){
		cin>>x>>y;
		a[i] = {y,x};
	}

	sort(a.rbegin(),a.rend());

	vector<int> box(m);

	rep(i,0,m) cin>>box[i];
	int l,r;

	rep(i,0,q){
		cin>>l>>r;
		--l,--r;
		multiset<int> ms;

		rep(i,0,m){
			if(i<l || i>r){ ms.insert(box[i]); }
		}

		int ans = 0;

		rep(i,0,n){
			auto itr = ms.lower_bound(a[i].se);
			if(itr!=ms.end()){
				ans+=a[i].fi;
				ms.erase(itr);
			}
		}
		cout<<ans<<endl;
	}
}

signed main() {
    fast

    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif

    cout.precision(10);
    cout<<fixed;

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

    for (int i = 1; i <= t; i++) {
        // cout << "Case #" << i  << ": ";
        solve();
    }
}

        

// ###### Fri Mar 5 20:57:40 IST 2021


#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define forn(ii, a, b) for (int ii = a; ii < b; ii++) 
#define scan(any)      for (auto &i : any) cin >> i;
#define debug(x)       cerr << #x << " " << x << " -- \n"   
#define int64          long long
#define sized(x)       (int)x.size()
#define all(x)         (x).begin(), (x).end()
#define precise(x)     cout << fixed << setprecision(9) << x << '\n';
using namespace std;
using namespace __gnu_pbds;
template <class T> using indexed_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;     
const int N = 3e5+7;
int test(){  
    int n,m,q;
    cin >> n  >> m >> q;
    vector <pair<int,int>> baggage(n);
    for(auto& p : baggage)
        cin >> p.first >> p.second;
    sort(all(baggage));
    
    vector <int> boxes(m);
    scan(boxes);
    int l,r;
    while(q--){
        cin >> l >> r;
        l--,r--; 
        int real_ans = 0;
        vector <pair<int,int>> b = baggage;
        vector <int> BOX;
        forn(j,0,l) 
            BOX.push_back(boxes[j]);
        forn(j,r+1,m)
            BOX.push_back(boxes[j]);
        sort(all(BOX));
        for(auto p : BOX){ 
            int ans = -1;
            int last = n;
            int box_size = p;
            forn(i,0,n)
                if( b[i].first <= box_size){
                    last = i;
                    if(b[i].second > 0)
                        ans = max(ans, b[i].second);
                }else
                    break;
            if(ans == -1)
                continue;
            forn(i,0,last+1)
                if(b[i].second == ans){
                    b[i].second = 0;
                    break;
                }
            real_ans += ans;
        } 
        cout << real_ans << '\n'; 
    }
    return 0 ;  
}
int main(){
    ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);   

    int cases = 1;
    // cin >> cases; 

    while(cases--) 
        test();
    return 0LL;
}

 
 