已过,但还是不懂为啥这样只有85分
#include<cstdio>
#include<algorithm>
#define N 605
using namespace std;
int n,m,a[N];
double w;
int main(){
scanf("%d%lf",&n,&w);
w/=100;
for(int i=1,x;i<=n;i++){
scanf("%d",&x);
a[x]++;
m=max(1.0,i*w);
// printf("%d\n",m);
for(int j=N;j>=0;j--){
m-=a[j];
if(m<=0){
printf("%d ",j);
break;
}
}
}
return 0;
}