#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int N){
int l = 1, r = N;
while ( l < r ) {
int m = (l + r) / 2;
// cout << l << ' ' << m << ' ' << r << '\n';
Guess(l);
int b = Guess(r);
if ( b == 1 ) {
l = m + 1;
}
else if ( b == -1 ) {
if ( l % 2 == r % 2 ) {
r = m - 1;
}
else {
r = m;
}
}
else {
return m;
}
}
return r;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
36 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
1408 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
777 ms |
24640 KB |
Output is partially correct - alpha = 0.068965517241 |