#include <bits/stdc++.h>
using namespace std;
long long n,q,s,t,a[200010];
int main () {
freopen("foehn.in","r",stdin);
freopen("foehn.out","w",stdout);
cin >> n >> q >> s >> t;
for (int i=0;i<=n;i++) {
cin >> a[i];
}
while (q--) {
long long l,r,k,res=0;
cin >> l >> r >> k;
for (int i=l;i<=r;i++) {
a[i]+=k;
}
for (int i=0;i<n;i++) {
if (a[i]<a[i+1]) res-=(a[i+1]-a[i])*s;
else res+=(a[i]-a[i+1])*t;
}
cout << res <<endl;
}
return 0;
}