#include "grader.h"
int HC(int N){
int lo = 1;
int hi = N;
while(hi - lo + 1 > 8){
Guess(lo);
int r = Guess(hi);
if(r > 0){
lo = (lo + hi)/2 + 1;
}else{
hi = (lo + hi)/2;
}
}
int last = -1;
for(int i = lo; i <= hi; i += 2){
int cur = Guess(i);
if(last == -1){
last = cur;
continue;
}
if(cur == -1) return i-2;
if(cur == 0) return i-1;
last = cur;
}
return hi;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
29 ms |
2552 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
32 ms |
2556 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
29 ms |
2552 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
773 ms |
18716 KB |
Output isn't correct - alpha = 0.000000000000 |