#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;
long long n,p,s,t,a[N],cha[N],sum[N];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>p>>s>>t;
for(int i=0;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++) cha[i]=a[i]-a[i-1];
for(int i=1;i<=p;i++){
long long l,r,z;
cin>>l>>r>>z;
cha[l]+=z;
cha[r+1]-=z;
long long b=0;
for(int j=1;j<=n;j++){
if(cha[j]<0) b+=t*abs(cha[j]);
else b-=s*abs(cha[j]);
}
cout<<b<<endl;
}
return 0;
}
求助大佬,悬关