#include <bits/stdc++.h>
using namespace std;
int n,m,t,f[110][110],q[110];bool b[110];
struct BAG
{
	int w,v;
}a[61];
bool cmp(BAG x,BAG y)
{
	return x.v>y.v;
}
struct BOX
{
	int num,pos;
}x[110];
bool cmp1(BOX x,BOX y)
{
	return x.num<y.num;
}
int main()
{
	scanf("%d %d %d",&n,&m,&t);
	for(int i=1;i<=n;i++)
		scanf("%d %d",&a[i].w,&a[i].v);
	sort(a+1,a+n+1,cmp);
	for(int i=1;i<=m;i++)
		scanf("%d",&x[i].num),x[i].pos=i;
	sort(x+1,x+m+1,cmp1);
	while(t--)
	{
		memset(f,0,sizeof(f));
		memset(b,0,sizeof(b));
		int l,r,ans=0,cnt=0;
		scanf("%d %d",&l,&r);
		for(int i=1;i<=m;i++)
			if(!(x[i].pos<=r&&x[i].pos>=l))
				q[++cnt]=x[i].num;
		sort(q+1,q+cnt+1);
		for(int i=1;i<=n;i++)
			for(int j=1;j<=cnt;j++)
				if(!b[j]&&a[i].w<=q[j])
				{
					b[j]=true,ans+=a[i].v;
					break;
				}
		printf("%d\n",ans);
	}
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (n); i++)

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> w(n), v(n);
    rep(i, n) cin >> w[i] >> v[i];
    vector<int> x(m);
    rep(i, m) cin >> x[i];
    rep(qi, q) {
        int l, r;
        cin >> l >> r;
        --l; --r;
        vector<int> as;
        rep(i, m) if (i < l || r < i) as.push_back(x[i]);
        sort(as.begin(), as.end());
        vector<bool> used(n);
        int ans = 0;
        for (int a : as) {
            P best(-1, -1);
            rep(i, n) {
                if (used[i]) continue;
                if (w[i] > a) continue;
                best = max(best, P(v[i], i));
            }
            int i = best.second;
            if (i == -1) continue;
            used[i] = true;
            ans += v[i];
        }
        cout << ans << endl;
    }
    return 0;
}