AC

鑫鑫  •  1个月前


include <bits/stdc++.h>

using namespace std; int a[605]; int main() {

int n, w, t;
cin >> n >> w;
for(int p = 1;p <= n;p ++){
	cin >> t;
	a[t] ++;
	int tmp = max(1, p * w / 100);
	for(int i = 600;i >= 0;i --){
		tmp -= a[i];
		if(tmp <= 0){
			cout << i << ' ';
			break;
		}
	}
}
return 0;

}


评论:

请先登录,才能进行评论