#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int n){
if(n == 1) {
return 1;
}
int res = 0, last = 0, cnt = 0;
for(int step = 1 << 8; step; step >>= 1) {
if(res + step <= n) {
int cur = Guess(res + step);
cnt++;
if(cnt == 1) {
last = res + step - 1;
if(Guess(res + step - 1) == -1) {
res += step;
}
}
else {
if(cur == 0) {
return (last + res + step) / 2;
}
last = res + step - 1;
if(res + step > 1 && Guess(res + step - 1) == -1) {
res += step;
}
}
}
}
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
31 ms |
5496 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
33 ms |
5368 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
5368 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
709 ms |
128376 KB |
Output isn't correct - alpha = 0.000000000000 |