# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
613146 | penguinhacker | King of Chairs (FXCUP4_chairs) | C++17 | 71 ms | 6752 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 <bits/stdc++.h>
using namespace std;
long long SendInfo(vector<int> w, vector<int> c) {
/*int n=w.size();
sort(w.begin(), w.end());
int lb=0, rb=n;
while(lb<rb) {
int mid=(lb+rb+1)/2;
bool ok=1;
for (int i=0; i<mid; ++i)
ok&=w[i]<=c[n-mid+i];
if (ok)
lb=mid;
else
rb=mid-1;
}
return lb;*/
return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
#define ar array
//long long B;
set<ar<int, 2>> st;
void Init(long long _B, vector<int> C) {
for (int i=0; i<C.size(); ++i)
st.insert({C[i], i+1});
}
int Maid(int W) {
auto it=st.lower_bound({W});
if (it==st.end())
return -1;
int x=(*it)[1];
st.erase(it);
return x;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |