#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace std;

typedef long long int64;
const int inf = (int)1e9;

int main()
{
	while(true) {
		
		int n, m, h, k;
		vector<int> state, score;
		vector<pair<int, int> > edge;
		vector<pair<int, int> > hist;
		
		scanf("%d%d%d%d", &n, &m, &h, &k);
		if(n == 0)
			break;
		score.resize(n);
		for(int i = 0; i < n; ++i)
			scanf("%d", &score[i]);
		edge.resize(m);
		for(int i = 0; i < m; ++i)
			scanf("%d%d", &edge[i].second, &edge[i].first);
		sort(edge.begin(), edge.end());
		
		state.resize(n);
		hist.resize(m);
		for(int i = 0; i < n; ++i)
			state[i] = i;
		for(int i = 0; i < m; ++i) {
			int a = edge[i].second;
			int b = a - 1;
			swap(state[a], state[b]);
			hist[i] = make_pair(state[a], state[b]);
		}
		
		vector<int> xscore;
		xscore.resize(n);
		for(int i = 0; i < n; ++i)
			xscore[state[i]] = score[i];
		
		int ans = 0;
		int start = 0;
		
		for(int i = 0; i < k; ++i)
			start += xscore[i];
		ans = start;
		
		//for(int i = 0; i < n; ++i)
		//	printf("[debug] %d -> %d\n", i, xscore[i]);
		
		for(int i = 0; i < m; ++i) {
			
			int a = hist[i].first;
			int b = hist[i].second;
			
			if(a < k && b < k)
				continue;
			if(a >= k && b >= k)
				continue;
			
			int t = start;
			
			t += a < k ? -xscore[a] : xscore[a];
			t += b < k ? -xscore[b] : xscore[b];
			
			ans = min(t, ans);
		}
		
		printf("%d\n", ans);
	}
	
	return 0;
}

/* ハラスメントに負けず */
/* 0完太陽にも負けず */
/* はやく人権を獲得したい */
/* nullmineralが書きましたが */
/* 責任はまったくとりません */