提交时间:2023-07-16 18:02:09

运行 ID: 23799

#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;} } } }