Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
23796 U•ェ•*✔ 直播获奖CSP2020 J组 C++ 通过 460 MS 260 KB 294 2023-07-16 17:55:23

Tests(20/20):


#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++){ cin>>x; s[x]++; int t=w*i/100; t=max(1,t); int z=0; for(int j=600;j>=0;j--){ z+=s[j]; if(z>=t){ cout<<j<<' '; break; } } } }


测评信息: