#include <cstdio>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <string>

const int SIZE = 1<<18;
using namespace std;  // XXX
template <class T>
struct segtree {
  T node[2*SIZE], lazy[2*SIZE], I_upd, I_qry;
  bool need_upd[2*SIZE];
  T (*upd_f)(T, T, int, int), (*qry_f)(T, T);

  segtree(T (*op1)(T, T, int, int), T (*op2)(T, T), T X_upd, T X_qry) {
    upd_f = op1;
    qry_f = op2;
    I_upd = X_upd;
    I_qry = X_qry;
    fill(lazy, lazy+2*SIZE, I_upd);
    fill(node, node+2*SIZE, I_qry);
    fill(need_upd, need_upd+2*SIZE, false);
  }

  void init(const vector<T>& vec) {
    int N = vec.size();
    for (int i=0; i<N; ++i)
      node[SIZE-1+i] = vec[i];
    for (int i=SIZE-2; i>=0; --i)
      node[i] = qry_f(node[2*i+1], node[2*i+2]);
  }

  void lazy_eval(int k, int l, int r) {
    if (!need_upd[k]) return;
    node[k] = upd_f(node[k], lazy[k], l, r);
    if (r-l > 1) {
      lazy[2*k+1] = upd_f(lazy[2*k+1], lazy[k], 0, 1);
      lazy[2*k+2] = upd_f(lazy[2*k+2], lazy[k], 0, 1);
      need_upd[2*k+1] = need_upd[2*k+2] = true;
    }
    lazy[k] = I_upd;
    need_upd[k] = false;
  }

  void update(int a, int b, T val, int l=0, int r=SIZE, int k=0) {
    lazy_eval(k, l, r);
    if (b <= l || r <= a) return;
    if (a <= l && r <= b) {
      lazy[k] = upd_f(lazy[k], val, 0, 1);
      need_upd[k] = true;
      lazy_eval(k, l, r);
    } else {
      int mid = (l+r)/2;
      update(a, b, val, l, mid, 2*k+1);
      update(a, b, val, mid, r, 2*k+2);
      node[k] = qry_f(node[2*k+1], node[2*k+2]);
    }
  }

  T query(int a, int b, int l=0, int r=SIZE, int k=0) {
    lazy_eval(k, l, r);
    if (b <= l || r <= a) return I_qry;
    if (a <= l && r <= b) return node[k];
    int mid = (l+r)/2;
    T vl = query(a, b, l, mid, 2*k+1);
    T vr = query(a, b, mid, r, 2*k+2);
    return qry_f(vl, vr);
  }
};

intmax_t upd(intmax_t a, intmax_t b, int l, int r) {
  return a + (r-l)*b;
}

intmax_t fnd(intmax_t a, intmax_t b) {
  return a+b;
}

intmax_t foehn(intmax_t S, intmax_t T, intmax_t left, intmax_t right) {
  if (left < right) {
    return -S * (right-left);
  } else {
    return T * (left-right);
  }
}

segtree<intmax_t> sg(upd, fnd, 0, 0);

int main() {
  size_t N, Q;
  intmax_t S, T;
  scanf("%zu %zu %jd %jd", &N, &Q, &S, &T);

  std::vector<intmax_t> H(N+1);
  for (size_t i=0; i<=N; ++i)
    scanf("%jd", &H[i]);

  // std::vector<intmax_t> L(Q), R(Q), X(Q);
  // for (size_t i=0; i<Q; ++i)
  //   scanf("%jd %jd %jd", &L[i], &R[i], &X[i]);

  for (size_t i=0; i<=N; ++i) {
    sg.update(i, i+1, H[i]);
  }

  intmax_t init = 0;
  for (size_t i=1; i<=N; ++i) {
    intmax_t left = sg.query(i-1, i);
    intmax_t right = sg.query(i, i+1);
    init += foehn(S, T, left, right);
  }

  intmax_t res = init;
  for (size_t i=0; i<Q; ++i) {
    int L, R;
    intmax_t X;
    scanf("%d %d %jd", &L, &R, &X);

    {
      intmax_t l0 = sg.query(L-1, L);
      intmax_t l1 = sg.query(L, L+1);
      res -= foehn(S, T, l0, l1);
    }
    if (R < N) {
      intmax_t r0 = sg.query(R, R+1);
      intmax_t r1 = sg.query(R+1, R+2);
      res -= foehn(S, T, r0, r1);
    }

    sg.update(L, R+1, X);
    
    {
      intmax_t l0 = sg.query(L-1, L);
      intmax_t l1 = sg.query(L, L+1);
      res += foehn(S, T, l0, l1);
    }
    if (R < N) {
      intmax_t r0 = sg.query(R, R+1);
      intmax_t r1 = sg.query(R+1, R+2);
      res += foehn(S, T, r0, r1);
    }

    // for (size_t j=0; j<=N; ++j)
    //   fprintf(stderr, "%jd%c", sg.query(j, j+1), j<N? ' ':'\n');

    printf("%jd\n", res);
  }
}



Measured memory_bytes: 12760