This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "king.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll SendInfo(vector<int> W, vector<int> C) {
return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
set<pair<int, int>> C;
void Init(ll B, vector<int> C_) {
int n = C_.size();
for (int i = 0; i < n; i++) {
C.emplace(C_[i], i);
}
// sort(C.begin(), C.end());
}
int Maid(int W) {
auto it = C.lower_bound(pair<int, int>(W + 1, 0));
if (it == C.begin()) return -1;
it = prev(it);
int ans = it->second;
if (W > it->first) return -1;
C.erase(it);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |