/** * @FileName a.cpp * @Author kanpurin * @Created 2021.02.05 23:07:33 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n,x,y; cin >> n >> x >> y; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } constexpr long long LLINF = 1e18 + 1; vector> dpx(n+1,vector(3)),dpy(n+1,vector(3)); dpx[0][1] = -LLINF; dpy[n][1] = -LLINF; dpx[0][2] = -LLINF; dpy[n][2] = -LLINF; for (int i = 0; i < n; i++) { dpx[i+1][0] = dpx[i][0]+a[i]; dpx[i+1][1] = max(dpx[i][1]+x,dpx[i][0]+x); dpx[i+1][2] = max(dpx[i][1]+a[i],dpx[i][2]+a[i]); } for (int i = n-1; i >= 0; i--) { dpy[i][0] = dpy[i+1][0]+a[i]; dpy[i][1] = max(dpy[i+1][1]+y,dpy[i+1][0]+y); dpy[i][2] = max(dpy[i+1][1]+a[i],dpy[i+1][2]+a[i]); } for (int i = 1; i < n-1; i++) { cout << max({dpx[i][1],dpx[i][2]}) + a[i] + max({dpy[i+1][1],dpy[i+1][2]}) << endl; } return 0; }