题解
太巧妙了!!
code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,w;
cin>>n>>w;
int score[605]={0};
for(int i=1;i<=n;i++)
{
int x;
cin>>x;
score[x]++;
int sum=0;
for(int j=600;j>=0;j--)
{
sum+=score[j];
if(sum>=max(i*w/100,1))
{
cout<<j<<" ";
break;
}
}
}
return 0;
}
标签:int,sum,score,J2020,CSP,P7072
From: https://www.cnblogs.com/pure4knowledge/p/18063175