#ifdef MY_LOCAL
#define MY_NAMESPACE(ns) namespace ns {
#define MY_NAMESPACE_    }
#define MY_DEBUG(s)      s
#define MY_IS_DEBUG      (true)
#else
#define MY_NAMESPACE(ns) 
#define MY_NAMESPACE_    
#define MY_DEBUG(s)
#define MY_IS_DEBUG      (false)
#endif

#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;

#define EPS (1e-7)
#define PI (acos(-1))

constexpr int IMIN = numeric_limits<int>::min();
constexpr int IMAX = numeric_limits<int>::max();
constexpr ll LLMIN = numeric_limits<ll>::min();
constexpr ll LLMAX = numeric_limits<ll>::max();


MY_NAMESPACE(testbed)
int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int n, m, q;
	cin >> n >> m >> q;

	vector<pll> item(n);
	for (int i = 0; i < n; i++)
	{
		ll w, v;
		cin >> w >> v;
		item.push_back({ w, v });
	}
	vector<ll> boxes(m);
	for (int i = 0; i < m; i++)
	{
		cin >> boxes[i];
	}

	auto sort_fn = [](pll const& lhs, pll const& rhs)->bool
	{
		return lhs.second > rhs.second;
	};
	sort(item.begin(), item.end(), sort_fn);

	for (int i = 0; i < q; i++)
	{
		int l, r;
		cin >> l >> r;
		l--;
		r--;
		vector<ll> this_boxes = boxes;
		this_boxes.erase(this_boxes.begin() + l, this_boxes.begin() + r + 1);

		auto sort_fn2 = [](ll const& lhs, ll const& rhs)->bool
		{
			return lhs < rhs;
		};
		sort(this_boxes.begin(), this_boxes.end(), sort_fn2);

		ll ans = 0;
		for (int j = 0; j < n; j++)
		{
			auto it = lower_bound(this_boxes.begin(), this_boxes.end(), item[j].first);
			if (it != this_boxes.end())
			{
				ans += item[j].second;
				this_boxes.erase(it);
			}
		}
		cout << ans << "\n";
	}

	return 0;
}
MY_NAMESPACE_

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <queue>
#include <numeric>
using namespace std;

using ll = long long;

#define For(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFor(i,a,b) for(ll i=(a);i>=(ll)(b);i--)
#define co(a) cout<<a<<endl
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
#define cfs(a) cout<<fixed<<setprecision(a) 


int main() {
	ll N, M, Q;
	cin >> N >> M >> Q;
	ll W, V;
	vector<pair<ll,ll>> vw(N);
	For(i, 0, N) {
		cin >> W >> V;
		vw[i].first = V;
		vw[i].second = W;
	}
	vector<pair<ll,ll>> X(M);
	For(i, 0, M) {
		cin >> X[i].first;
		X[i].second = i;
	}
	SORT(vw);
	REV(vw);
	SORT(X);
	vector<bool> used(M);
	ll start, end;
	ll ans;
	For(i, 0, Q) {
		ans = 0;
		cin >> start >> end;
		For(j, 0, start - 1) {
			used[j] = true;
		}
		For(j, start - 1, end) {
			used[j] = false;
		}
		For(j, end, M) {
			used[j] = true;
		}
		For(j, 0, N) {
			For(k, 0, M) {
				if (used[X[k].second]) {
					if (vw[j].second <= X[k].first) {
						ans += vw[j].first;
						used[X[k].second] = false;
						break;
					}
				}
			}
		}
		co(ans);
	}
}