#include <iostream>
#include <vector>
#include <set>
#include <utility>
#include <algorithm>

using namespace std;
typedef pair<int, int> pii;

int main(){
        while(true){
                int n, m, h, k;
                cin >> n >> m >> h >> k;
                if(n == 0 && m == 0 && h == 0 && k == 0){ break; }
                vector<int> points(n);
                for(int i = 0; i < n; ++i){ cin >> points[i]; }
                vector<pii> lines(m);
                for(int i = 0; i < m; ++i){ cin >> lines[i].second >> lines[i].first; }
                sort(lines.begin(), lines.end());
                vector<int> dest(n);
                for(int i = 0; i < n; ++i){ dest[i] = i; }
                set<pii> swapTable;
                for(int i = 0; i < m; ++i){
                        swap(dest[lines[i].second - 1], dest[lines[i].second]);
                        swapTable.insert(pii(
                                min(dest[lines[i].second - 1], dest[lines[i].second]),
                                max(dest[lines[i].second - 1], dest[lines[i].second])
                        ));
                }
                vector<int> scores(n);
                for(int i = 0; i < n; ++i){ scores[dest[i]] = points[i]; }
                int sum = 0, answer = 0;
                for(int i = 0; i < k; ++i){ sum += scores[i]; }
                answer = sum;
                for(
                        set<pii>::iterator it = swapTable.begin();
                        it != swapTable.end(); ++it
                ){
                        if(it->first >= k || it->second < k){ continue; }
                        answer = min(answer, sum - scores[it->first] + scores[it->second]);
                }
                cout << answer << endl;
        }
        return 0;
}