#include<cmath>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<cstring>
#include<ctime>
#include<deque>
#include<iomanip>
#include<list>
#include<map>
#include<deque>
#include<queue>
#include<set>
#include<stack>
#include<vector>
#include<string>
#include<sstream>
#include<chrono>
#include<random>
#include<unordered_map> 
#include<ctype.h>
#include<cassert>
#include<numeric>
#include<functional>
using namespace std;
typedef long long ll; typedef std::pair<ll, ll> pll; typedef std::pair<int, int> pii; typedef unsigned long long ull; typedef long double ldb; typedef double db;
#define pb push_back
#define eb emplace_back
#define all(a) (a).begin(),(a).end()
template <class output_type, class input_type>
output_type Convert(const input_type& input) {
	stringstream ss; output_type result;
	ss.clear(); ss << input; ss >> result;
	return result;
}
const double Pi = acos(-1.0); const int inf = 1 << 29, Mod = 1e9 + 7, N = 1e5 + 3; const ll INF = 1ll << 60;
inline ll qpow(ll a, ll b, ll mod = Mod, ll ans = 1) {
	while (b) {
		if (b & 1)ans = ans * a % mod;
		a = a * a % mod; b >>= 1;
	}return ans;
}
ll gcd(ll a, ll b) { return (b ? gcd(b, a % b) : a); }; ll lcm(ll a, ll b) { return a * b / (gcd(a, b)); }
pii EXgcd(int x, int y) {        //return.first ny
	if (!y) { return { 1,0 }; }pii a = EXgcd(y, (x + y) % y);
	return { a.second, a.first - a.second * (x / y) };
}
inline bool Ezisprime(int n) {
	if (n <= 1)return 0; if (n <= 3)return 1;
	vector<int> ezp{ 5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97 };
	for (int i = 0; i < ezp.size(); i++)if (n == ezp[i])return 1;
	for (int i = 2; i <= sqrt(n); i++)if (n % i == 0)return 0;
	return 1;
}
inline int LIS(const vector<int> Origins, const int n) {
	if (!n || !Origins.size()) return 0;
	int len = 0; vector<int> d(n, 0); d[0] = Origins[0];
	for (int i = 1; i < n; i++)
		if (Origins[i] >= d[len])d[++len] = Origins[i];
		else d[upper_bound(d.begin(), d.begin() + len, Origins[i]) - d.begin()] = Origins[i];
	return len + 1;
}
inline int Alptonum(const char& a) { if (a <= 'z')return int(a - 'a'); else return int(a - 'A'); }
inline char Numtoalp(const int& n, bool& t) { if (!t)return char('a' + n); else return char('A' + n); }
inline bool cmp(const pii& a, const pii& b) {  //default more and more larger
	if (a.second == b.second)return a.first < b.first;
	return a.second > b.second;
}
struct cmpstl {           //reverse
	inline bool operator()(const pii& a, const pii& b) {
		if (a.second == b.second)return a.first > b.first;
		return a.second < b.second;
	}
};
//partial_sum(begin,end,place,minus<int>()) adjacent_differece(begin,end,place) 
//count(begin(),end(),char=='x') count_if(begin(),end(),boolcmp) vector<int> p(n);iota(p.begin(), p.end(), 0);

//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Code follows ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\\
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Code follows VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVII

int main()
{
	ios::sync_with_stdio(0); cout.tie(0), cin.tie(0);

	int n, m, q; cin >> n >> m >> q;
	vector<pii>bags(n); vector<int>boxes(m);
	for (auto& i : bags)cin >> i.first >> i.second;
	for (auto& i : boxes)cin >> i;
	sort(all(bags),cmp);
	while (q--)
	{
		int l, r; cin >> l >> r; --l, --r;
		vector<int> tboxes;
		for (int i = 0; i < l; ++i)tboxes.emplace_back(boxes[i]);
		for (int i = r + 1; i < m; ++i)tboxes.emplace_back(boxes[i]);
		sort(all(tboxes));
//		for (auto& box : tboxes)cout << box << ' ' << '\n';
		ll ans = 0;
		for (auto &bag:bags)
			for (auto &box:tboxes)
				if (box >= bag.first)
				{
					box=-1, ans += bag.second;
					break;
				}
		cout << ans << "\n";
	}
}


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



*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
typedef pair<int,int>P;

//int v[50];
//int w[50];
int x[50];
int y[50];//クエリ作業用
int main(){
  int n,m,q;
  cin>>n>>m>>q;
  vector<P>vec;
  rep(i,n){
    int w,v;
    cin>>w>>v;
    vec.push_back({v,w});
  }
  sort(vec.begin(),vec.end());
  /*for(auto e:vec){
    cout<<e.first<<" "<<e.second<<endl;
  }*/

  rep(i,m) cin>>x[i];
  int ans=0;
  //クエリ
  rep(i,q){
    ans=0;
    int l,r;
    cin>>l>>r;
    l--;
    r--;
    for(int j=0;j<m;j++){
      if(l<=j && j<=r){
        y[j]=0;
      }
      else{
        y[j]=x[j];
      }
    }
    sort(y,y+m);
    for(int k=n-1;k>=0;k--){
      for(int l=0;l<m;l++){
        if(vec[k].second<=y[l]){
          ans+=vec[k].first;
          y[l]=0;
          break;
        }
      }
    }
    cout<<ans<<endl; 
  }
}

  
 
    
    