 #include<bits/stdc++.h>
using namespace std;
typedef pair< int , int > Pi;

int main()
{
  int n, m, h, k;
  while(cin >> n >> m >> h >> k, n){
    vector< int > s(n), nums(n), pos(n);
    vector< Pi > data(m), buffer(m);
    for(int i = 0; i < n; i++){
      cin >> s[i];
      nums[i] = i;
    }
    for(int i = 0; i < m; i++){
      cin >> data[i].second >> data[i].first;
      --data[i].second;
    }
    sort( data.begin(), data.end());
    for(int i = 0; i < m; i++){
      swap( nums[data[i].second], nums[data[i].second + 1]);
      buffer[i] = make_pair( nums[data[i].second], nums[data[i].second + 1]);
    }

    int ret = 0, base = 0;
    for(int i = 0; i < n; i++){
      if(nums[i] < k) ret += s[i];
      pos[nums[i]] = i; // 位置
    }
    base = ret;

    for(int i = 0; i < m; i++){
      int crease = base;
      if(buffer[i].first < k){
        crease += s[pos[buffer[i].second]];
        crease -= s[pos[buffer[i].first]];
      }
      if(buffer[i].second < k){
        crease += s[pos[buffer[i].first]];
        crease -= s[pos[buffer[i].second]];
      }
      ret = min( crease, ret);
    }
    cout << ret << endl;
  }
  return(0);
}