Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- pair<int, string> build_sol_with_split(
- const vector<int>& note_real_acolo, const vector<int>& note_uman_real_acolo,
- vector<pair<int, int>> ours, const int how_many_real){
- const int low_grade = (how_many_real == 0 ? -1 : note_real_acolo[how_many_real-1]);
- auto it = partition(begin(ours), end(ours),
- [&](const pair<int, int>& p){ return p.first >= low_grade; });
- if(it-begin(ours) < how_many_real) return make_pair(-1, string(1, '0'));
- sort(begin(ours), it, [](const pair<int, int>& a, const pair<int, int>& b){
- return a.second < b.second; });
- it = begin(ours) + how_many_real;
- sort(it, end(ours), [](const pair<int, int>& a, const pair<int, int>& b){
- return a.second > b.second; });
- }
- int main()
- {
- cout << "Hello world!" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement