Submission #764168

#TimeUsernameProblemLanguageResultExecution timeMemory
764168idkhandleKing of Chairs (FXCUP4_chairs)C++17
0 / 100
40 ms6872 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...