#include<bits/stdc++.h>
using namespace std;
int a[9999];
int f[9999];```c
#include<bits/stdc++.h>
using namespace std;
int a[9999];
int f[9999];
int main()
{
long long x,b,c,d,g,sum; //g 为人数 c为获奖率
int o;
cin>>g>>c;
for(int i=1;i<=g;i++)
{
cin>>x;
a[x]++;
o=floor(i*(1.0*c/100));
d=max(1,o);
//cout<<d<<" ";
sum=0;
for(int j=600;j>=0;j--)
{
if(sum+a[j]>=d)
{
cout<<j<<" ";
break;
}
sum=sum+a[j];
}
}
return 0;
}
int main()
{
long long x,b,c,d,g,sum; //g 为人数 c为获奖率
int o;
cin>>g>>c;
for(int i=1;i<=g;i++)
{
cin>>x;
a[x]++;
o=floor(i*(1.0*c/100));
d=max(1,o);
//cout<<d<<" ";
sum=0;
for(int j=600;j>=0;j--)
{
if(sum+a[j]>=d)
{
cout<<j<<" ";
break;
}
sum=sum+a[j];
}
}
return 0;
}