是不是水了???
查看原帖
是不是水了???
1091848
封禁用户楼主2024/9/24 22:19
#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行代码???
|-------|\

2024/9/24 22:19
加载中...