|
- #include<iostream>
- #include<algorithm>
- #include<queue>
- using namespace std;
- int k,a,b,c,n;
- int flag,t,standard;
- priority_queue<int>q;
- int main()
- {
- cin>>n>>a>>b;;
- c=a+b;
- for(int i=1; i<=n; i++)
- {
- cin>>k;
- q.push(k);
- }
- while(!q.empty())
- {
- k=q.top();
- if(k<=standard)break;
- q.pop();
- k-=b;
- standard+=a;
- q.push(k);
- t++;
- }
- cout<<t;
- return 0;
- }
复制代码 |
|