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 "grader.h"
int HC(int N){
int lo = 1;
int hi = N;
while(lo+1 < hi){
Guess(lo);
int mid = (lo + hi)/2;
int r = Guess(mid);
if(r > 0){
int rr = Guess(hi);
if(rr > 0){
lo = (mid + hi)/2 + 1;
}else{
lo = (lo + mid)/2 + 1;
hi = (mid + hi)/2;
}
}else{
hi = (lo + mid)/2;
}
}
if(lo == hi) return lo;
Guess(lo);
if(Guess(hi) == 1) return hi;
else return lo;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |