0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 06:18:48 +00:00

P7072 直播获奖

R41907572
This commit is contained in:
Baoshuo Ren 2020-11-14 22:14:22 +08:00 committed by Baoshuo Ren
parent fff8697e47
commit 45a2330bb9
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

15
problem/P7072/P7072.cpp Normal file
View File

@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, w, t;
vector<int> score;
cin >> n >> w;
for (int i = 1; i <= n; i++) {
cin >> t;
score.insert(lower_bound(score.begin(), score.end(), t), t);
cout << score[score.size() - max(1, i * w / 100)] << ' ';
}
return 0;
}