Submission #231629

#TimeUsernameProblemLanguageResultExecution timeMemory
231629palpatinezwKing of Chairs (FXCUP4_chairs)C++17
100 / 100
139 ms12996 KiB
#include <bits/stdc++.h> #include "king.h" using namespace std; long long SendInfo(std::vector<int> W, std::vector<int> C) { return 0; }
#include <bits/stdc++.h> #include "vassal.h" using namespace std; typedef pair<int, int> pi; #define f first #define s second multiset<pi> c; void Init(long long B, std::vector<int> C){ int i = 0; for (auto it:C) { c.insert(pi(it, i)); i++; } } int Maid(int W){ auto it = c.lower_bound(pi(W, -1)); if (it==c.end()) { return -1; } int ans = (*it).s; c.erase(it); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...