RT,p7072,WA一个,TLE一半
#include<iostream>
#include<math.h>
#include<iomanip>
#include<cstring>
#include<algorithm>
#include<string>
using namespace std;
double w;
long long n,s[1000005];
bool cmp(int a,int b){
return a>b;
}
int main(){
cin>>n>>w;
w/=100;
for(long long p=1;p<=n;p++){
cin>>s[p];
sort(s+1,s+p+1,cmp);
int m=max(1,(int)(p*w));
cout<<s[m]<<' ';
}
return 0;
}