Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
23799 | yihang | 直播获奖CSP2020 J组 | C++ | 通过 | 480 MS | 260 KB | 276 | 2023-07-16 18:02:09 |
#include"bits/stdc++.h" using namespace std; int s[1005]; int main(){ int n,w,x; cin>>n>>w; for(int i=1;i<=n;i++){ int t=i*w/100; t=max(t,1); cin>>x; s[x]++; int t1=0; for(int j=600;j>=0;j--){ t1+=s[j]; if(t1>=t){ cout<<j<<" "; break;} } } }