#include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<algorithm>

using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)

	vector<pair<int,int> > y;
int main(){
	while(1){
		int n,m,h,k;
		scanf("%d%d%d%d",&n,&m,&h,&k);
		if(n==0)break;
		
		int tt[1002];
		rep(i,n){
			scanf("%d",&tt[i]);
		}
		
		y.clear();
		rep(j,m){
			int a,b;
			scanf("%d%d",&a,&b);
			y.push_back(make_pair(b,a));
		}
		
		int num[1002];
		rep(i,1002)num[i]=i;
		
		sort(y.begin(),y.end());
		
		int hav[1002];
		rep(i,m){
			swap(num[y[i].second-1],num[y[i].second]);
		}
		
		rep(i,n){
			hav[num[i]]=tt[i];
		}
		
		rep(i,1002)num[i]=i;
		
		int maxi=0;
		rep(i,m){
			swap(num[y[i].second-1],num[y[i].second]);
			int a=num[y[i].second-1];
			int b=num[y[i].second];
			
			if(a>b)swap(a,b);
			
			if(a<k && k<=b){
				int val=hav[a]-hav[b];
				//if(val<0)val*=-1;
				maxi=max(maxi,val);
			}
		}
		
		int ans=0;
		rep(i,k){
			ans+=hav[i];
		}
		ans-=maxi;
		
		
		
		printf("%d\n",ans);
	}
}