# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
232054 | Blerargh | King of Chairs (FXCUP4_chairs) | C++17 | 0 ms | 0 KiB |
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 <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;
}
}