Submission #232055

#TimeUsernameProblemLanguageResultExecution timeMemory
232055BlerarghKing of Chairs (FXCUP4_chairs)C++17
100 / 100
141 ms13152 KiB
#include "king.h" #include <vector> 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> ii; set<ii> chairs; void Init(long long B, vector<int> C){ int n = C.size(); for (int i=0; i<n; i++){ chairs.insert(make_pair(C[i],i)); } } int Maid(int w){ auto it = chairs.lower_bound(make_pair(w,0)); if (it == chairs.end()) return -1; else { int ans = (*it).second; chairs.erase(it); return ans; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...