汤园是只猫 • 1个月前
using namespace std;
int main() {
freopen("live.in", "r", stdin);
freopen("live.out", "w", stdout);
int n, w, f;
cin >> n >> w;
int a[605] = {0};
for (int i = 1; i <= n; i++) {
cin >> f;
a[f]++;
int max = i * w / 100;
if (max < 1){
max = 1;
}
int c = 0;
for (int j = 600; j >= 0; j--) {
c += a[j];
if (c >= max) {
cout << j << " ";
break;
}
}
}
return 0;
}
评论:
请先登录,才能进行评论