# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83037 | ioilolcom | The Big Prize (IOI17_prize) | C++14 | 63 ms | 576 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 "prize.h"
int find_best(int n) {
int l=0;
int r=n-1;
int mid;
while(l<=r) {
mid=(l+r)/2;
std::vector<int> res = ask(mid);
if(res[1]==1) {
l=mid+1;
}
else if(res[0]==1) {
r=mid-1;
}
else if(res[0]==0&&res[1]==0) {
return mid;
}
}
return mid;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |