#include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<complex>
#include<tuple>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double D;
typedef complex<D> P;
#define F first
#define S second
const ll E=1e18+7;
const ll MOD=1000000007;


template<typename T,typename U>istream & operator >> (istream &i,pair<T,U> &A){i>>A.F>>A.S; return i;}
template<typename T>istream & operator >> (istream &i,vector<T> &A){for(auto &I:A){i>>I;} return i;}
template<typename T,typename U>ostream & operator << (ostream &o,pair<T,U> &A){o<<A.F<<" "<<A.S; return o;}
template<typename T>ostream & operator << (ostream &o,vector<T> &A){ll i=A.size(); for(auto &I:A){o<<I<<(--i?" ":"");} return o;}
template<typename T>vector<T> & cset(vector<T> &A,T e=T()){for(auto &I:A){I=e;} return A;}

namespace Monotone_Minima{
    //argmin(cul(i,*))<=argmin(cul(j,*)) for(i<j)
    //を満たすn行m列の行列で、各行の最小値を求め、そのindexを返す。
    template<typename T>
    vector<int> argmin(function<T(int,int)> cul,int n,int m,function<bool(T,T)> comp=less<T>()){
        vector<int> ret(n,-1);
        int i=2;
        while(i<n){i<<=1;}
        while(i>>=1){
            for(int j=0;j<n;j+=i){
                if(ret[j]!=-1){continue;}
                int l=(j-i>=0 && ret[j-i]!=-1?ret[j-i]:0),r=(j+i<n && ret[j+i]!=-1?ret[j+i]+1:m);
                T a=cul(j,l);
                ret[j]=l;
                for(int k=l+1;k<r;k++){
                    if(comp(cul(j,k),a)){
                        a=cul(j,k);
                        ret[j]=k;
                    }
                }
            }
        }
        return ret;
    }
    
    //f(i,k)+f(j,l)<=f(i,l)+f(j,k) for(i<=j,k<=l)
    //を満たすn行n列の行列Aに対して、
    //dp[i]=min_{j<i} dp[j]+A_{i,j}
    //を求める。
    template<typename T>
    vector<T> divide_and_conquer(function<T(int,int)> cul,int n,T e=T(),function<bool(T,T)> comp=less<T>()){
        vector<T> ret(n,e);
        for(int i=1;i<n;i++){ret[i]=ret[0]+cul(i,0);}
        for(int i=1;i<n;i++){
            int j=i&(-i);
            int k=i-j;
            auto fnc=[&](int a,int b){return ret[k+b]+cul(i+a,k+b);};
            vector<int> am=argmin<T>(fnc,min(j,n-i),j,comp);
            for(int s=0;s<j && i+s<n;s++){
                T a=fnc(s,am[s]);
                if(comp(a,ret[i+s])){ret[i+s]=a;}
            }
        }
        return ret;
    }
}

using namespace Monotone_Minima;


pair<D,int> & operator +=(pair<D,int> &a,pair<D,int> b){a.F+=b.F; a.S+=b.S; return a;}
pair<D,int> operator +(pair<D,int> a,pair<D,int> b){a.F+=b.F; a.S+=b.S; return a;}


int main(){
    ll s,n,m;
    cin>>s>>n>>m;
    vector<ll> X(s);
    cin>>X;
    vector<pll> A(n);
    cin>>A;
    vector<ll> B(n);
    if(m>=n){cout<<0<<endl; return 0;}
    for(int i=0;i<n;i++){
        A[i].S--;
        B[i]=A[i].F-X[A[i].S];
    }
    sort(B.begin(),B.end());
    vector<ll> C=B;
    for(int i=1;i<n;i++){C[i]+=C[i-1];}
    D l=-E,r=E;
    auto cul=[&](D a){
        auto fnc=[&](int i,int j){i--; j--; return pair<D,int>(a+B[i]*(i-j)-(C[i]-(j==-1?0LL:C[j])),1);};
        return divide_and_conquer<pair<D,int>>(fnc,n+1).back().S>m;
    };
    for(int i=0;i<120;i++){
        D mid=(l+r)/2;
        if(cul(mid)){l=mid;}
        else{r=mid;}
    }
    auto fnc=[&](int i,int j){i--; j--; return pair<D,int>(r+B[i]*(i-j)-(C[i]-(j==-1?0LL:C[j])),1);};
    auto ans=divide_and_conquer<pair<D,int>>(fnc,n+1).back();
    cout<<fixed<<setprecision(0)<<ans.F-m*r<<endl;
    
    return 0;
}



Measured memory_bytes: 3400