#include <bits/stdc++.h>
using namespace std;
int t[610];
int n,w,x,ans;
int main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin>>n>>w;
for(int i=1;i<=n;i++){
cin>>x;
t[x]++;
ans=0;
for(int j=600;j>=0;j--){
ans+=t[j];
if(ans>=max(1,i*w/100)){
cout<<j<<' ';
break;
}
}
}
return 0;
}
|-------|
|普及-|=====22行代码???
|-------|\