# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148868 | mit한의대지망생 (#200) | 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>
using namespace std;
typedef long long llong;
llong SendInfo(vector<int> W, vector<int> C) {
return 0;
}
#include "vassel.h"
#include <vector>
#include <set>
#include <tuple>
#define fs first
#define se second
using namespace std;
typedef long long llong;
typedef pair<int, int> pii;
multiset<pii> sp;
void Init(llong B, vector<int> C) {
for (int i = 0; i < C.size(); ++i) {
sp.emplace(C[i], i);
}
}
int Maid(int w) {
auto it = sp.lower_bound(pii(w, 0));
if (it == sp.end()) return -1;
int ret = it->se;
sp.erase(it);
return ret;
}