/*input
3 4 3
1 9
5 3
7 8
1 8 6 9
4 4
1 4
1 3

*/


// assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for space
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

// order_of_key (k) : Number of items strictly smaller than k .
// find_by_order(k) : K-th element in a set (counting from zero).
using namespace __gnu_pbds;
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define ll          long long int
#define pb          push_back
#define pii         pair<ll ,ll >
#define vpii        vector< pii >
#define vi          vector<ll >
#define vs			vector< string >
#define vvi         vector< vector< ll > >
#define inf			(ll)1e18
#define all(it,a)   for(auto it=(a).begin();it!=(a).end();it++) 
#define F           first
#define S           second
#define sz(x)       (ll )x.size()
#define rep(i,a,b)	for(ll  i=a;i<b;i++)
#define repr(i,a,b) for(ll  i=a;i>b;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define mp          make_pair
#define whatis(x)   cout << #x << " is " << x << "\n";
#define graph(n)    adj(n,vector< ll > () )
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define debug(x)     cout << #x << " " << x << endl;
#define debug_p(x)   cout << #x << " " << x.F << " " << x.S << endl;
#define debug_v(x)   {cout << #x << " "; for (auto ioi : x) cout << ioi << " "; cout << endl;}
#define debug_vp(x)  {cout << #x << " "; for (auto ioi : x) cout << '[' << ioi.F << " " << ioi.S << ']'; cout << endl;}
#define debug_v_v(x) {cout << #x << "/*\n"; for (auto ioi : x) { for (auto ioi2 : ioi) cout << ioi2 << " "; cout << '\n';} cout << "*/" << #x << endl;}

bool cmp(pii p1,pii p2){
	if(p2.S==p1.S) return p1.F < p2.F;
	else return p1.S > p2.S;
}

int solve()
{
	ll N,M,Q; cin>>N>>M>>Q;
	vector<pii> a(N);
	vi X(M);
	rep(i,0,N) cin>>a[i].F>>a[i].S;
	rep(i,0,M) cin>>X[i];

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

	rep(q,0,Q){
		ll L,R;cin>>L>>R;
		L--,R--;

		multiset<ll> curX;
		for(ll i=0;   i<L; i++) curX.insert(X[i]);
		for(ll i=R+1; i<M; i++) curX.insert(X[i]);

		ll ans = 0;
		for(ll i=0; i<N; i++){
			auto it = curX.lower_bound(a[i].F);
			if(it != curX.end()) {
				ans += a[i].S;
				curX.erase(it);
			}
		}

		cout<<ans<<"\n";
	}

	return 0;
}

int main()
{
	auto start = chrono::high_resolution_clock::now();

    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
	
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	ll test_cases=1;
	//cin>>test_cases;
	while(test_cases--)
		solve();

	auto stop = chrono::high_resolution_clock::now();
	auto duration = chrono::duration_cast<chrono::milliseconds>(stop-start);
	//cout<<"\nduration: "<<(double)duration.count()<<" milliseconds";
}
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int,int> PI;
const int maxm=2e6+5;
PI e[maxm];
PI ee[maxm];
int n,m,q;

int main(){
   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,vector<int>,less<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;
   }
}