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 lt = 1;
int rt = N;
while (lt < rt) {
Guess(lt);
int res = Guess(rt);
if (res == 0) {
return (lt + rt) / 2;
}
if (res == 1) {
lt = (lt + rt) / 2 + 1;
}
else {
rt = (lt + rt - 1) / 2;
}
}
return lt;
}
# | 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... |