#include <iostream>
#include <iomanip>
#include <algorithm>
#include <array>
#include <cassert>
#include <optional>
#include <utility>
#include <vector>
#include <cmath>
// #include <atcoder/all>

template <class InputIterator>
std::ostream& range_output(std::ostream& os_arg, InputIterator first_arg, InputIterator last_arg){ if(first_arg != last_arg){ do{ os_arg << *(first_arg++); if(first_arg == last_arg) break; os_arg << ' '; } while(true); }  return os_arg; }
template <class Tp> std::ostream& operator << (std::ostream& os_arg, const std::vector<Tp>& arr_arg){ return range_output(os_arg, arr_arg.cbegin(), arr_arg.cend()); }
template <class Tp, std::size_t Size> std::ostream& operator << (std::ostream& os_arg, const std::array<Tp, Size>& arr_arg){ return range_output(os_arg, arr_arg.cbegin(), arr_arg.cend()); }
template <class S, class T> std::ostream& operator << (std::ostream& os_arg, const std::pair<S, T>& pair_arg){ return os_arg << '(' << pair_arg.first << ", " << pair_arg.second << ')'; }

#ifndef ONLINE_JUDGE
    template <typename Head> void dump_out(Head head_arg){ std::cerr << head_arg << '\n'; }
    template <typename Head, typename... Tail>
    void dump_out(Head head_arg, Tail... tail_args){ std::cerr << head_arg << ", "; dump_out(tail_args...); }
    #define dump(...) do { std::cerr << "[in line " << __LINE__ << "] " << #__VA_ARGS__ << " : "; dump_out(__VA_ARGS__); } while(false)
#else
    #define dump(...) (void(0))
#endif

template <class S, class T> bool chmax(S& x, const T& y){ if(x < y){ x = y; return true; } return false; }
template <class S, class T> bool chmin(S& x, const T& y){ if(x > y){ x = y; return true; } return false; }

struct nimotsu {
    int size, value;
};

int main(void){
    std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); 
    std::cout << std::fixed << std::setprecision(16);
    
    int n, m, q; std::cin >> n >> m >> q;
    std::vector<nimotsu> P(n);
    for(int i = 0; i < n; ++i) std::cin >> P[i].size >> P[i].value;
    std::sort(P.begin(), P.end(), [](const nimotsu& x, const nimotsu& y){
        if(x.value != y.value) return x.value > y.value;
        return x.size < y.size;
    });

    std::vector<int> X(m); for(int i = 0; i < m; ++i) std::cin >> X[i];

    // [l, r)
    const auto solve = [&](int l, int r) -> int {
        std::vector<int> S; S.reserve(m - (r - l));
        for(int i = 0; i < l; ++i) S.push_back(X[i]);
        for(int i = r; i < m; ++i) S.push_back(X[i]);
        std::sort(S.begin(), S.end());
        long long int used = -1;
        int res = 0;
        for(const int s : S){
            for(int i = 0; i < n; ++i){
                if(((used >> i) & 1) and P[i].size <= s){ res += P[i].value; used ^= (1LL << i); break; }
            }
        }
        return res;
    };

    while(q--){
        int l, r; std::cin >> l >> r; --l;
        std::cout << solve(l, r) << '\n';
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using Int = long long;


int vmax(vector<int> w,vector<int> v, vector<int> x){
    int n=w.size();
    int m=x.size();

    int ans=0;
    sort(x.begin(),x.end());

    rep(i,m){
        vector<int> can_keep_num(0);
        rep(j,n){
            if(w[j]<=x[i]){
                can_keep_num.push_back(j);
            }
        }
        if(can_keep_num.size()==0) continue;
        
        int max_num=0;
        int can_max=0;
        for(int j: can_keep_num){
            if(v[j]>can_max){
                can_max=v[j];
                max_num=j;
            }
            else if(v[j]==can_max){
                if(w[j]>w[max_num]) max_num=j;
            }
        }

        ans+=can_max;
        w[max_num]=1000001;

    }

    return ans;
}

int main(){
    int n,m,q;cin>>n>>m>>q;
    vector<int> w(n);
    vector<int> v(n);
    vector<int> x(m);

    rep(i,n){
        cin>>w[i]>>v[i];
    }
    rep(i,m) cin>>x[i];

    rep(i,q){
        vector<int> y(m);
        rep(j,m) y[j]=x[j];
        int l,r; cin>>l>>r;
        rep2(j,l-1,r) x[j]=0;
        cout<<vmax(w,v,x)<<endl;
        rep(j,m) x[j]=y[j];
    }





}