#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,j,n) for(int i=j;i<n;i++)
#define fordebug int hoge;cin>>hoge;
#define DEKAI 1000000007;
#define INF (1<<28)
#define int long long
#define double long double
#define floot10 cout<<fixed<<setprecision(10)
int dp[100100];

signed main(){
  int n,m,s,t;
  cin>>n>>m>>s>>t;
  priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>> > q;
  int cost[100100];
  lp(i,n){
    cin>>cost[i+1];
  }
  vector<pair<int,int> > v;
  lp(i,m){
    int a,b;
    cin>>a>>b;
    if(a>t) continue;
    if(a<s) a=s;
    v.push_back({a,b});
  }
  sort(v.begin(),v.end());
  q.push({0,s});
  lp(i,v.size()){
    int fr=v[i].first;
    int to=v[i].second;
    while(1){
      if(q.top().second<fr) q.pop();
      else break;
    }
    q.push({q.top().first+cost[to],to});
  }
  while(1){
    if(q.top().second<t) q.pop();
    else break;
  }
  cout<<q.top().first<<endl;
  return 0;
}


