70求调
查看原帖
70求调
649751
Blued楼主2022/10/22 17:01
#include<bits/stdc++.h>
#define int long long
using namespace std;

const int N = 1e5;

int t;

int n , w;

int num;

vector < int > s;

int pos;

void work()
{
	num = (w / 100.0 * s.size());
	if(! num)
	num = 1;
	cout << s[num - 1] << ' ';
}

main()
{
//	freopen("fun.in" , "r" , stdin);
	
	cin >> n >> w;
	while(n --)
	{
		cin >> t;
		s.insert(upper_bound(s.begin() , s.end() , t) , t);
		reverse(s.begin() , s.end());                  
		work();    
		reverse(s.begin() , s.end());     
	}
		
		                                                   
//	for(int i = 0;i < s.size();i ++)
//	cout << s[i] << ' ';
}                                 
2022/10/22 17:01
加载中...