#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define pll pair<ll,ll>
#define ppl pair<pll,ll>
#define plp pair<ll,pll>
#define pi 3.14159265358979323846264338327950
const ll MOD=1e9+7;
using namespace std;
ll n,m,q,x[55];
ll w[55],val[55];

ll POWER(ll base,ll expo)
{
    ll ret=1;
    while(expo)
    {
        if(expo&1)ret=ret*base;
        expo>>=1;
        base=base*base;
    }
    return ret;
}

bool cmp(const pll &a, const pll &b)
{
    if(a.fi == b.fi)return (a.se < b.se);

    return a.fi > b.fi;
}

ll fun(vector<ll>& v)
{
    ll y = v.size();
    ll ans = 0;
    vector<ll> used(n+1,0);
    for(ll i=0;i<y;i++){
        ll mx_v = 0,in = -1;
        for(ll j=1;j<=n;j++){
            if(!used[j] && w[j] <= v[i] && val[j] > mx_v){
                mx_v = val[j];
                in = j;
            }
        }
        if(in != -1){
            ans += mx_v;
            used[in] = 1;
        }
    }
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll test_cases=1; //cin>>test_cases;
    while(test_cases--)
    {
        //freopen("input.txt","r",stdin);
        //freopen("output.txt","w",stdout);
        cin>>n>>m>>q;
        for(ll i=1;i<=n;i++)
            cin>>w[i]>>val[i];
        for(ll i=1;i<=m;i++)cin>>x[i];
        while(q --){
            ll l,r; cin>>l>>r;
            vector<ll> v;
            for(ll i=1;i<l;i++)
                v.pb(x[i]);
            for(ll i=r+1;i<=m;i++)
                v.pb(x[i]);
            sort(v.begin(),v.end());
            cout<<fun(v)<<endl;
        }
    }
    return 0;
}

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

// template {{{
#define  range(i, l, r) for (int i = (int)(l); i < (int)(r); (i) += 1)
#define rrange(i, l, r) for (int i = (int)(r) - 1; i >= (int)(l); (i) -= 1)

#define  whole(f, x, ...) ([&](decltype((x)) container) { return (f)(  begin(container),  end(container), ## __VA_ARGS__); })(x)
#define rwhole(f, x, ...) ([&](decltype((x)) container) { return (f)( rbegin(container), rend(container), ## __VA_ARGS__); })(x)

#define debug(x) cerr << "(" << __LINE__ << ")" << #x << ": " << (x) << endl

using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;

constexpr i32 mod   = 1e9 + 7;
// constexpr i32 mod   = 998244353;

constexpr i32 inf   = 1001001001;
constexpr i64 infll = 1001001001001001001ll;

constexpr i32 dx[] = {0, -1, 1, 0, -1, 1, -1, 1}; 
constexpr i32 dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};

struct IoSetup { IoSetup(i32 x = 15){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(x); cerr << fixed << setprecision(x); } } iosetup;

template <typename T = i64> T input() { T x; cin >> x; return x; }

template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { range(i, 0, v.size()) { os << v[i] << (i + 1 != (int)v.size() ? " " : ""); } return os; } 
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }

template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; }

template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }

template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// }}}

void solve() {
  int n, m, q;
  cin >> n >> m >> q;

  vector< pair<int, int> > vs(n);
  vector< int > xs(m);
  
  range(i, 0, n) {
    cin >> vs[i].second >> vs[i].first;
  }

  rwhole(sort, vs);

  cin >> xs;

  while (q--) {
    int l = input() - 1, r = input();
    vector< int > ss;
    range(i, 0, l) ss.emplace_back(xs[i]);
    range(i, r, m) ss.emplace_back(xs[i]);

    whole(sort, ss);

    i64 ans = 0;
    range(i, 0, n) {
      range(j, 0, ss.size()) {
        if (ss[j] >= vs[i].second) {
          ans += vs[i].first;
          ss[j] = -1;
          break;
        }
      }
    }

    cout << ans << endl;
  }
}

signed main() {
  solve();
}
