| 比赛 | EYOI常规赛 1st | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 奶牛晒衣服 | 最终得分 | 100 |
| 用户昵称 | 该账号已注销 | 运行时间 | 0.710 s |
| 代码语言 | C++ | 内存使用 | 4.68 MiB |
| 提交时间 | 2021-12-15 19:37:42 | ||
#include<bits/stdc++.h>
using namespace std;
int n,a,b,c[500100],cnt=0;
int main(){
freopen("dry.in","r",stdin);
freopen("dry.out","w",stdout);
cin>>n>>a>>b;
priority_queue<int>q;
for(int i=1;i<=n;i++)
{
cin>>c[i];
q.push(c[i]);
}
while(!q.empty())
{
int x=q.top();
q.pop();
if(x<=cnt*a)break;
cnt++;
x=x-b;
q.push(x);
}
cout<<cnt<<endl;
return 0;
}