#include<bits/stdc++.h>
#define int long long
using namespace std;
int a[100005];
signed main(){
freopen("test.txt","r",stdin);
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int n,x,p,q;
int mt;
cin>>n>>x>>p>>q;
mt=x*p,x*=q;
for(int i=1;i<=n;i++){
cin>>a[i];
a[i]*=q;
}
int pre=1,pt=0,tt=0,ans=0;
while(pre<=n){
int t=ceil((((a[pre]-pt+ans*mt)*1.0)/(x-mt))-1.0);
if(t<0) t=0;
if(t){
pt+=x*t;
tt=0;
ans+=t;
continue;
}
while(tt<x && pre<=n){
tt+=a[pre];
if(tt>=x) break;
pre++;
}
if(pre==n && tt<x) continue;
tt-=a[pre];
pt+=(x-tt);
tt=0;
ans++;
}
cout<<ans;
}
样例全过,然而挂零