| 记录编号 | 557473 | 评测结果 | AAAAAAAAAAAAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 3499.[CSP 2020J]直播获奖 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 1.569 s | ||
| 提交时间 | 2020-11-16 19:14:21 | 内存使用 | 9.56 MiB | ||
#include<bits/stdc++.h>
using namespace std;
int t[605];
int n,w;
int main()
{
freopen("csp2020pj_live.in","r",stdin);
freopen("csp2020pj_live.out","w",stdout);
int x;
cin>>n>>w;
for(int i=1;i<=n;i++)
{
cin>>x;
t[x]++;
int sum=0;
for(int j=600;j>=0;j--)
{
sum+=t[j];
if(sum>=max(1,i*w/100))
{
cout<<j<<' ';
break;
}
}
}
return 0;
}