# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
613251 | ajpiano | 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"
using namespace std;
long long SendInfo(vector<int> W, vector<int> C){
return 0;
}
#include <bits/stdc++.h>
#include "vassal.h"
using namespace std;
set<pair<int,int>> chairs; //weight index
void Init(int B, vector<int> c){
int n = c.size();
for(int i = 0; i < n; i++){
chairs.insert({c[i],i});
}
}
int Maid(int w){
auto it = chairs.lower_bound({w,0});
if(it == chairs.end()) return -1;
else{
int ans = it->second;
chairs.erase(it);
return ans;
}
}