#include"grader.h"
int HC(int N)
{
int l,r,m;
l=1;
r=N;
while(l<r)
{
Guess(l);
m=Guess(r);
if(m==0)return (l+r)/2;
if(m==1)l=(l+r)/2+1;
else r=(l+r-1)/2;
}
return l;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
37 ms |
1272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
35 ms |
1272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
1272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
736 ms |
8332 KB |
Output is partially correct - alpha = 0.068965517241 |