#include <bits/stdc++.h>
using namespace std;
const int N=200020;
int n,q,s,t;
long long a[N],ret=0;
int main() {
freopen("foehn.in","r",stdin);
freopen("foehn.out","w",stdout);
scanf("%d%d%d%d",&n,&q,&s,&t);
for (int i=0;i<=n;i++)
{
scanf("%lld",&a[i]);
}
while (q--)
{
int l,r,dis;
ret=0;
scanf("%d%d%d",&l,&r,&dis);
for (int i=l;i<=r;i++)
{
a[i]+=dis;
}
for (int i=1;i<=n;i++)
{
if (a[i]<a[i-1])
{
ret+=(a[i-1]-a[i])*t;
}
if (a[i]>a[i-1])
{
ret-=(a[i]-a[i-1])*s;
}
}
printf("%lld\n",ret);
}
}