#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
int HC(int N){
if(N == 1)return 1;
int lo = 1,hi = N,md;
int lst = 1;
Guess(lo);
while(lo < hi){
md = (lo + hi)/2;
int res;
if(lst == 0){
res = -1 * Guess(lo);
lst = 1;
}else{
res = Guess(hi);
lst = 0;
}
if(res == 0)return md;
if(res == 1){
lo = md+1;
if(lst == 1)
Guess(lo);
}else{
hi = md;
if(lst == 0)
Guess(hi);
}
}
return hi;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
1272 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
27 ms |
1360 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
734 ms |
8300 KB |
Output isn't correct - alpha = 0.000000000000 |