#include "grader.h"
int HC(int N){
int l=1,r=N;
int pivot=1;
while(l<r){
Guess(pivot);
int res=Guess((l+r)/2);
if(res==0){
return (pivot+((l+r)/2))/2;
}
else if(res==-1){
r=((l+r)/2)-1;
}
else if(res==1){
l=((l+r)/2)+1;
}
}
return ((pivot+l)/2);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
21 ms |
11100 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
21 ms |
11096 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
11096 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
467 ms |
72972 KB |
Output isn't correct - alpha = 0.000000000000 |
2 |
Halted |
0 ms |
0 KB |
- |