#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <set>
#include <utility>
#include <vector>
using namespace std;

#define FOR(it,c) for(__typeof((c).begin())it=(c).begin(); it!=(c).end();++it)

template<class T> inline void chmin(T& a, const T& b) { if(b < a) a = b; }

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	for(int n, m, h, k; cin >> n >> m >> h >> k, n;) {
		vector<int> points(n);
		for(int i = 0; i < n; ++i)
			cin >> points[i];

		set<pair<int, int> > line;
		for(int i = 0; i < m; ++i) {
			int a, b;
			cin >> a >> b;
			line.insert(make_pair(b, a));
		}

		vector<int> which;
		which.reserve(n);
		for(int i = 0; i < n; ++i)
			which.push_back(i);

		vector<pair<int, int> > can_swap;
		can_swap.reserve(m);

		FOR(it, line) {
			if(which[it->second - 1] <= which[it->second]) {
				can_swap.push_back(make_pair(which[it->second - 1], which[it->second]));
				swap(which[it->second - 1], which[it->second]);
			}
			else {
				swap(which[it->second - 1], which[it->second]);
				can_swap.push_back(make_pair(which[it->second - 1], which[it->second]));
			}
		}

		vector<int> dest(n);
		for(int i = 0; i < n; ++i)
			dest[which[i]] = i;

		int sum = 0;
		for(int i = 0; i < k; ++i)
			sum += points[dest[i]];

		int ans = sum;
		for(int i = 0; i < m; ++i)
			if(can_swap[i].first < k && can_swap[i].second >= k)
				chmin(ans, sum - points[dest[can_swap[i].first]]+ points[dest[can_swap[i].second]]);

		cout << ans << endl;
	}

	return EXIT_SUCCESS;
}