#include <iostream>
#include <vector>
#include <cmath>
using namespace std;

typedef pair<int,int> P;

int main(){
	int n,m,h,k,s[1000],score[1000],a,b;
	int num[1000];
	vector<int> bou[1000];
	vector<P> swp;
	while(1){
		cin >> n >> m >> h >> k;
		if(!n) break;
		swp.clear();
		for(int i = 0;i < 1000;i++) bou[i].clear();
		for(int i = 0;i < n;i++) {
			cin >> s[i];
			num[i] = i;
		}
		for(int i = 0;i < m;i++){
			cin >> a >> b;
			bou[b - 1].push_back(a - 1);
		}
		for(int i = 0;i < h;i++){
			for(int j = 0;j < bou[i].size();j++){
				int pos = bou[i][j];
				swp.push_back(P(num[pos],num[pos + 1]));
				int tmp = num[pos];
				num[pos] = num[pos + 1];
				num[pos + 1] = tmp;
			}
		}
		int sum = 0;
		for(int i = 0;i < n;i++){
			score[num[i]] = s[i];
		}
		for(int i = 0;i < k;i++) sum += score[i];
		int ma = -1000000000;
		for(int i = 0;i < swp.size();i++){
			P p = swp[i];
			if(p.first < k && p.second >= k)
			ma = max(ma,score[p.first] - score[p.second]);
		}
		cout << min(sum - ma,sum) << endl;
	}
	return 0;
}