#include<bits/stdc++.h>
#define ull unsigned long long
using namespace std;
const int MAX=1e6+5;
int n,m,c,k;
ull tot,cnt,sum,ans;
int main(){
ios::sync_with_stdio(NULL);
cin.tie(0);cout.tie(0);
cin>>n>>m>>c>>k;
for(int i=1;i<=n;i++){
ull a;
cin>>a;
sum|=a;
}
for(int i=1;i<=m;i++){
ull p,q;
cin>>p>>q;
if((sum>>p&1)==0) cnt|=(1<<p);
}
c=sum&cnt;ans=1;
for(int i=0;i<k;i++)
if((c>>i&1)==0) tot++;
ans<<=tot;
if(ans==0&&n==0) cout<<"18446744073709551616";
else cout<<ans-n;
return 0;
}
先不考虑抄题解这件事