为什么不过
查看原帖
为什么不过
548059
VastUniverse_Hory楼主2022/7/24 14:31
#include <bits/stdc++.h>
using namespace std;
int n, w, p;
multiset <int> a;

int main()
{
	freopen("live.in", "r", stdin);
	freopen("live.out", "w", stdout);
	scanf("%d%d", & n, & w);
	while (n --)
	{
		p ++;
		int t;
		scanf("%d", & t);
		a.insert(t);
		int pn = max(1, int (p * w / 100));
		auto i = a.end();
		while (pn --)
		{
			i = -- i;
		}
		cout << * i << ' ';
	}
	cout << endl;
	return 0;
}

为什么有三个点超时了?

2022/7/24 14:31
加载中...