全网第一个二分
2024-10-14 21:05:48
发布于:广东
11阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main() {
vector<int> a;
int n,w;
cin >> n >> w;
for(int i = 1;i <= n;i ++) {
int x;
cin >> x;
auto tmp = lower_bound(a.begin(),a.end(),x,greater<int>());
a.insert(tmp,x);
int tmp2 = max(1,i * w / 100);
cout << a[tmp2 - 1] << " ";
}
return 0;
}
这里空空如也
有帮助,赞一个