| 记录编号 | 549408 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1210.[NOIP 2010冲刺十二]奶牛晒衣服 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.943 s | ||
| 提交时间 | 2020-02-10 22:05:10 | 内存使用 | 13.66 MiB | ||
#include<bits/stdc++.h>
using namespace std;
priority_queue <int> q;
int N,A,B,t;
int main()
{
freopen("dry.in","r",stdin);
freopen("dry.out","w",stdout);
int a;
cin>>N>>A>>B;
t=0;
for(int i=0;i<N;i++)
{
cin>>a;
q.push(a);
}
while(q.top()-t*A>0)
{
t++;
int k=q.top();
q.pop();
q.push(k-B);
}
cout<<t<<endl;
return 0;
}