| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 151640 | cos18 | King of Chairs (FXCUP4_chairs) | C++17 | 42 ms | 3912 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"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int N = W.size();
return W[0]*100 + W[1]*10 + W[2]*1;
}
#include "vassal.h"
#include <algorithm>
std::vector<int> realC;
int find(int target, int start, int end){
int location = (start+end)/2;
if(target==realC[location]) return location;
if(start==end){
if(target>realC[location]) return location;
return location-1;
}
if(target>realC[location]) return find(target, start, location-1);
return find(target, location+1, end);
}
void Init(long long B, std::vector<int> C){
realC = C;
sort(realC.begin(), realC.end());
}
int Maid(int W){
int location = find(W, 0, realC.size());
if(location>=0){
realC.erase(realC.begin()+location);
return location;
}
return -1;
}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... | ||||
