#include<bits/stdc++.h>
using namespace std;
__int128 n,q,s,t,a[200001]={0},f[200001]={0},b=0;
__int128 read()
{
__int128 f=1,w=0;
char ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
f=-1;
ch=getchar();
}
while(ch<='9'&&ch>='0')
{
w=w*10+ch-'0';
ch=getchar();
}
return f*w;
}
void print(__int128 x)
{
if(x<0)
{
putchar('-');
x=-x;
}
if(x>9)
print(x/10);
putchar(x%10+'0');
}
int main()
{
n=read();
q=read();
s=read();
t=read();
for(__int128 i=1;i<=n+1;i++)
{
a[i]=read();
f[i-1]=a[i-1]-a[i];
}
for(__int128 i=1;i<=n;i++)
{
if(f[i]<0)
b+=f[i]*s;
if(f[i]>0)
b+=f[i]*t;
}
for(__int128 i=1;i<=q;i++)
{
__int128 x,y,z;
x=read();
y=read();
z=read();
x+=1;
y+=1;
if(x!=1)
{
if(f[x-1]<0)
{
b-=f[x-1]*s;
if(f[x-1]-z<0)
{
b+=(f[x-1]-z)*s;
}
else
{
b+=(f[x-1]-z)*t;
}
}
else
{
b-=f[x-1]*t;
if(f[x-1]-z<0)
{
b+=(f[x-1]-z)*s;
}
else
{
b+=(f[x-1]-z)*t;
}
}
}
if(y!=n+1)
{
if(f[y]<0)
{
b-=f[y]*s;
if(f[y]-z<0)
{
b+=(f[y]+z)*s;
}
else
{
b+=(f[y]+z)*t;
}
}
else
{
b-=f[y]*t;
if(f[y]-z<0)
{
b+=(f[y]+z)*s;
}
else
{
b+=(f[y]+z)*t;
}
}
}
f[x-1]-=z;
f[y]+=z;
print(b);
cout<<endl;
}
}