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"
#include <cstdio>
int HC(int N){
int lo = 1;
int hi = N;
while(lo < hi){
Guess(lo);
int r = Guess(hi);
if(r > 0){
lo = (lo + hi)/2 + 1;
}else if(r == 0){
return (lo + hi)/2;
}else{
hi = (lo + hi - 1)/2;
}
}
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... |