#include #define il inline #define ll long long #define lb long double using namespace std; il ll read(){ ll a=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-f;ch=getchar();} while(ch>='0'&&ch<='9'){a=a*10+ch-'0';ch=getchar();} return a*f; } ll n,A,B,f[300010],ruby[300010],ans=1e18,q[300010],head,tail; ll Y(ll x){ return f[x]+A*x+(x+1)*x/2*B; } lb K(ll x,ll y){ return (lb)1.0*(Y(x)-Y(y))/(x-y); } int main(){ // freopen("chips.in","r",stdin); // freopen("chips.out","w",stdout); memset(f,0x3f,sizeof f); n=read();A=read();B=read();f[0]=read(); q[1]=0;head=1;tail=1; for(int i=1;i<=n;++i){ ruby[i]=read(); while(head