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

int main(){
    long n, q;
    cin >> n >> q;
    long a[n], k[q];
    long b[n];
    vector <pair <long, long>> v;
    vector <long> ans(q);
    for(int i = 0; i < n; i++){
        cin >> a[i];
        if(i == 0) b[i] = a[i] - 1;
        else b[i] = b[i - 1] + a[i] - a[i - 1] - 1;
    }

    for(int i = 0; i < q; i++){
        cin >> k[i];
        v.push_back(make_pair(k[i], i));
    }

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

    long x, y, z, P, W;

    W = 0;

    for(int i = 0; i < q; i++){
        P = 0;
        for(int j = W; j < n; j++){
            if(v[i].first <= b[j]){
                x = a[j];
                y = b[j] - v[i].first;
                z = x - y - 1;

                P = 1;
                W = j;
                break;
            }
        }
        if(P == 1) ans[v[i].second] = z;
        else{
            ans[v[i].second] =  n + v[i].first;
            W = n;
        } 
    }

    for(int i = 0; i < q; i++){
        cout << ans[i] << endl;
    }

}
#include<ctime>
#include<cstdio>
#include<cctype>
#include<algorithm>
using namespace std;
const int N=50+5;
int read() {
	char c;
	int x=0,f=1;
	while(!isdigit(c=getchar()))
		f-=2*(c=='-');
	while (isdigit(c)){
		x=x*10+(c-48)*f;
		c=getchar();
	}
	return x;
}
struct bag{
	int w,v;
	bag(int a=0,int b=0){
		w=a;
		v=b;
	}
	bool operator <(bag b){
		return v>b.v;
	}
};
bag a[N];
int n,m,q,l,r,x[N],vis[N];
int main() {
	#ifndef ONLINE_JUDGE
	freopen("D.in","r",stdin);
	freopen("D.out","w",stdout);
	#endif
	clock_t t1=clock();
	//--------
	n=read();
	m=read();
	q=read();
	for(int i=1;i<=n;++i){
		int w=read();
		int v=read();
		a[i]=bag(w,v);
	}
	sort(a+1,a+n+1);
	for(int i=1;i<=m;++i)
		x[i]=read();
	for(int i=1;i<=q;++i){
		l=read();
		r=read();
		int cnt=0;
		int res=0;
		int sz=m-(r-l+1);
		for(int j=1;j<=m;++j)
			vis[j]=0;
		for(int j=1;j<=n;++j){
			if(cnt==sz)
				break;
			int pos=0;
			for(int k=1;k<l;++k){
				if(x[k]<a[j].w)
					continue;
				if(vis[k])
					continue;
				if(!pos||x[k]<x[pos])
					pos=k;
			}
			for(int k=m;k>r;--k){
				if(x[k]<a[j].w)
					continue;
				if(vis[k])
					continue;
				if(!pos||x[k]<x[pos])
					pos=k;
			}
			if(pos){
				++cnt;
				vis[pos]=1;
				res+=a[j].v;
			}
		}
		printf("%d\n",res);
	}
	//--------
	clock_t t2=clock();
	fprintf(stderr,"time:%0.3lfs",1.0*(t2-t1)/CLOCKS_PER_SEC);
	return 0;
}