int@n,@k,@x,@y,@a[n]; sortA(n,a); int b=max(0,n-y/x); int c=b?(a[b-1]-1)/+k:0; wt((ll)y*c+x*sum[ll][i,b,n]((a[i]-1)/+k)-(ll)x*c*(n-b));