啊哈

heyucheng 2023-06-24 9:20:50 2023-06-24 9:37:43 11 返回题目

#include<bits/stdc++.h>

using namespace std;

int a[700];

int main(){

 freopen("live.in", "r", stdin);

freopen("live.out", "w", stdout);

int n,w;

cin>>n>>w;

for(int i=1;i<=n;i++){

	int x,t,cnt=0;

	cin>>x;

	a[x]++;

	t=max(1,i*w/100);

	for(int j=600;j>=0;j--){

		cnt=cnt+a[j];

		if(cnt>=t){

			printf("%d ",j);

			break;

		}

	}

}

}

//没写注释是方便你看(复制黏贴)

{{ vote && vote.total.up }}