#include<bits/stdc++.h>
#define LL long long 
using namespace std;
int a[200001];
LL b[200001];
int main(void){
	int n,q,s,t;
	int l,r,x;
	int i;
	LL sum;
	LL o,p;
	int c,d;
	
	cin>>n>>q>>s>>t;
	
	for(i=0;i<=n;i++){
		cin>>a[i];
	}
	
	b[0]=0;
	for(i=1;i<=n;i++)	b[i]=a[i]-a[i-1];
	/* for(i=0;i<=n;i++)	cout<<b[i]<<" ";
	cout<<endl; */
	
	sum=0;
	for(i=1;i<=n;i++){
		if(b[i]<0){
			o=(LL)b[i]*-t;
			//cout<<"O="<<o<<endl;
			sum+=o;
		}
		if(b[i]>=0){
			p=(LL)b[i]*-s;
			//cout<<"P="<<p<<endl;
			sum+=p;
		}
	}
	//cout<<sum<<endl;
	
	
	for(i=0;i<q;i++){
		cin>>l>>r>>x;
		if(x>=0){
			if(b[l]+x>=0&&b[l]<0){
				c=(b[l]+x)-x;
				//cout<<"C="<<c<<endl;
				d=x+b[l];
				//cout<<"D="<<d<<endl;
				o=(LL)c*t;
				//cout<<"O="<<o<<endl;
				p=(LL)d*-s;
				//cout<<"P="<<p<<endl;
				sum+=o;
				//cout<<"SUMF="<<sum<<endl;
				sum+=p;
				//cout<<"SUMB="<<sum<<endl;
				
				b[l]+=x;
				//cout<<"B[l]="<<b[l]<<endl;
			}
			else{
				if(b[l]<0){
					o=(LL)x*-t;
					//cout<<"O="<<o<<endl;
					sum+=o;
					//cout<<"SUM="<<sum<<endl;
				}
				if(b[l]>=0){
					p=(LL)x*-s;
					//cout<<"P="<<p<<endl;
					sum+=p;
					//cout<<"SUM="<<sum<<endl;
				}
				b[l]+=x;
				//cout<<"B[l]="<<b[l]<<endl;
			}
			if(r+1<=n){
				if(b[r+1]-x<0&&b[r+1]>=0){
					c=x+(b[r+1]-x);
					//cout<<"C="<<c<<endl;
					d=b[r+1]-x;
					//cout<<"D="<<d<<endl;
					p=(LL)c*s;
					//cout<<"P="<<p<<endl;
					o=(LL)d*-t;
					//cout<<"O="<<o<<endl;
					sum+=p;
					//cout<<"SUMF="<<sum<<endl;
					sum+=o;
					//cout<<"SUMB="<<sum<<endl;
					
					b[r+1]-=x;
					//cout<<"B[r+1]="<<endl;
				}
				else{
					if(b[r+1]<0){
						o=(LL)x*t;
						//cout<<"O="<<o<<endl;
						sum+=o;
						//cout<<"SUM="<<sum<<endl;
					}
					if(b[r+1]>=0){
						p=(LL)x*s;
						//cout<<"P="<<p<<endl;
						sum+=p;
						//cout<<"SUM="<<sum<<endl;
					}
					b[r+1]-=x;
					//cout<<"B[r+1]="<<endl;
				}	
			}	
		}
		if(x<0){
			/* if(b[l]-x>=0&&b[l]<0){
				c=x+(b[l]-x);
				cout<<"C="<<c<<endl;
				d=b[l]-x;
				cout<<"D="<<d<<endl;
				o=(LL)c*-t;
				cout<<"O="<<o<<endl;
				p=(LL)d*s;
				cout<<"P="<<p<<endl;
				sum+=o;
				cout<<"SUMF="<<sum<<endl;
				sum+=p;
				cout<<"SUMB="<<sum<<endl;
				
				b[l]+=x;
				cout<<"B[l]="<<b[l]<<endl;
			}
			else  */if(b[l]+x<0&&b[l]>=0){
				c=(b[l]+x)-x;
			//  	cout<<"C="<<c<<endl;
				d=b[l]+x;
			//	cout<<"D="<<d<<endl;
				p=(LL)c*s;
			//	cout<<"P="<<p<<endl;
				o=(LL)d*-t;
			//	cout<<"O="<<o<<endl;
				sum+=p;
		//	cout<<"SUMF="<<sum<<endl;
				sum+=o;
			//	cout<<"SUMB="<<sum<<endl;
				
				b[l]+=x;
		//		cout<<"B[l]="<<b[l]<<endl;
			}
			else{
				if(b[l]<0){
					o=(LL)x*-t;
					//cout<<"O="<<o<<endl;
					sum+=o;
					//cout<<"SUM="<<sum<<endl;
				}
				if(b[l]>=0){
					p=(LL)x*-s;
					//cout<<"P="<<p<<endl;
					sum+=p;
					//cout<<"SUM="<<sum<<endl;
				}
				b[l]+=x;
				//cout<<"B[l]="<<b[l]<<endl;
			}
			if(r+1<=n){
				if(b[r+1]-x>=0&&b[r+1]<0){
					c=x+(b[r+1]-x);
				//	cout<<"C="<<c<<endl;
					d=b[r+1]-x;
				//	cout<<"D="<<d<<endl;
					o=(LL)c*t;
				//	cout<<"P="<<p<<endl;
					p=(LL)d*-s;
				//	cout<<"O="<<o<<endl;
					sum+=o;
				//	cout<<"SUMF="<<sum<<endl;
					sum+=p;
				//	cout<<"SUMB="<<sum<<endl;
					
					b[r+1]-=x;
					//cout<<"B[r+1]="<<b[r+1]<<endl;
				}
				else{
					if(b[r+1]<0){
						o=(LL)x*t;
						//cout<<"O="<<o<<endl;
						sum+=o;
						//cout<<"SUM="<<sum<<endl;
					}
					if(b[r+1]>=0){
						p=(LL)x*s;
						//cout<<"P="<<p<<endl;
						sum+=p;
						//cout<<"SUM="<<sum<<endl;
					}
					b[r+1]-=x;
					//cout<<"B[r+1]="<<b[r+1]<<endl;
				}
			}
		}
		cout/* <<"SUME=" */<<sum<<endl;
		/* for(int j=0;j<=n;j++){
			cout<<b[j]<<" ";
		}
		cout<<endl; */
	}
	return 0;
}
	


Measured memory_bytes: 5452