#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define Rep(i,j,n) for (ll i=(ll)(j);i<=(ll)(n);++i)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1e9+7;
const int mod = 998244353;
const ll INF = 2e15;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

/*
ll ti=clock();
cout<<("Execution Time: %.4lf sec", 1.0 * (clock() - ti) / CLOCKS_PER_SEC)<<endl;
*/

int main(){
  ll n,m,q;
  cin>>n>>m>>q;
  vl w(n),v(n);
  vector<Pll> bag;
  rep(i,n){
      cin>>w[i]>>v[i];
      bag.emplace_back(v[i],w[i]);
  }
  sort(all(bag),greater<Pll>());
  vl x(m);
  rep(i,m){
      cin>>x[i];
  }
  rep(i,q){
      ll l,r;
      cin>>l>>r;
      vl tmp;
      rep(i,m){
          if(i==l-1){
              i=r;
              if(r==m){
                  break;
              }
          }
          tmp.eb(x[i]);
      }
      sort(all(tmp));
      vector<bool> empty(sz(tmp),true);
      ll sum=0;
      rep(i,n){
          rep(j,sz(tmp)){
              if(bag[i].S<=tmp[j]&&empty[j]){
                  sum+=bag[i].F;
                  empty[j]=false;
                  break;
              }
          }
      }
      print(sum);
  }
}
#include<bits/stdc++.h>
using namespace std;
int n,m,q;
struct node{
	int w,v;
}a[55];
struct node1{
	int x,num;
}b[55];
int cmp(node x,node y){
	if(x.v==y.v)return x.w<y.w;
	return x.v>y.v;
}
int cmp2(node1 x,node1 y){
	return x.x<y.x;
}
typedef long long ll;
int x[55];
bool v[55];
ll ans=0ll;
int main(){
	cin>>n>>m>>q;
	for(int i=1;i<=n;i++)cin>>a[i].w>>a[i].v;
	for(int i=1;i<=m;i++)cin>>b[i].x,b[i].num=i;
	sort(b+1,b+m+1,cmp2);
	sort(a+1,a+n+1,cmp);
	while(q--){
		ans=0ll;
		memset(v,0,sizeof(v));
		int l,r;
		cin>>l>>r;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=m;j++){
				if(b[j].num>=l&&b[j].num<=r)continue;
				if(b[j].x>=a[i].w&&!v[b[j].num]){
					ans+=a[i].v;v[b[j].num]=1;break;
				}
			}
		}
		cout<<ans<<endl;
	}
}