#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int HC(int n) {
int l = 1 , r = n;
while(l < r) {
int mid = (l+r) >> 1;
Guess(l);
int val = Guess(r);
if(val == 0)
return mid;
if((l+r)%2 == 0) {
if(val == -1)
r = mid-1;
else
l = mid+1;
}
else {
if(val == -1)
r = mid;
else
l = mid+1;
}
}
return l;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
786 ms |
8172 KB |
Output is partially correct - alpha = 0.068965517241 |