#include <iostream>
#include <vector>

using namespace std;
typedef long long ll;

vector<ll> points;
vector<int> where;

ll point(int num) {
    return points[where[num]];
}

int main() {
    while (true) {
        int n, m, h, k;
        cin >> n >> m >> h >> k;
        if (n == 0)break;

        points = vector<ll>(n);
        for (int i = 0; i < n; i++)cin >> points[i];

        vector<vector<int>> bars(h);
        for (int i = 0; i < m; i++) {
            int a, b;
            cin >> a >> b;
            bars[b].push_back(a - 1);
        }

        vector<int> order(n);
        for (int i = 0; i < n; i++)order[i] = i;
        vector<vector<int>> change(n);
        for (int i = 0; i < h; i++) {
            for (auto bar:bars[i]) {
                auto l = order[bar];
                auto r = order[bar + 1];

                swap(order[bar], order[bar + 1]);
                change[l].push_back(r);
                change[r].push_back(l);
            }
        }

        where = vector<int>(n);
        for (int i = 0; i < n; i++) where[order[i]] = i;


        ll sum = 0;
        for (int i = 0; i < k; i++)sum += point(i);

        ll ret = sum;
        for (int i = 0; i < k; i++) {
            for (auto x:change[i]) {
                if (0 <= x && x < k)continue;

                ll tmp = sum + point(x) - point(i);
                ret = min(ret, tmp);
            }
        }

        cout << ret << endl;
    }
    return 0;
}
