#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);
r--;
}
else if(res==1){
l=((l+r)/2);
l++;
}
}
return (pivot+((l+r)/2)/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 |
22 ms |
11160 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
11096 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
449 ms |
88408 KB |
Output isn't correct - alpha = 0.000000000000 |
2 |
Halted |
0 ms |
0 KB |
- |