#include #define int long long #define maxn 300005 using namespace std; int n,A,B,W,d[maxn],dp[maxn],pre[maxn],ans=1e18; inline long double Y(int i){ double s=dp[i]+B*i*i*0.5+B*i*0.5+i*A; return s*1.000; } inline long double X(int i){return i*1.00;} inline long double k(int i,int j){return (Y(i)-Y(j))*1.00/(X(i)-X(j));} int head,tail,q[maxn]; signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>n>>A>>B>>W;dp[0]=W; for(int i=1;i<=n;++i)dp[i]=1e18; for(int i=1;i<=n;++i)cin>>d[i]; ans=W+n*(n+1)/2*B-n*A; if(n<=3000){ for(int i=1;i<=n;++i){ for(int j=0;j