求调
#include<bits/stdc++.h>
using namespace std;
int n,w,a[100001],b[100001];
bool cmp(int a,int b){
if(a!=b) return a>b;
}
int main(){
scanf("%d%d",&n,&w);
for(int i=1;i<=n;i++){
scanf("%d",&a[i]);
int sum=max(1.0,floor(i*w/100));
for(int j=1;j<=i;j++) b[j]=a[j];
sort(b+1,b+i+1,cmp);
cout<<b[sum]<<' ';
}
return 0;
}
记录在这里