#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int N){
int l=1,r=N;
int prev = -1;
while(l<r){
Guess(l);
int a = Guess(r);
int mid = (l+r)/2;
if(mid==prev)mid++;
prev = mid;
//std::cout << l << "\t" << r << '\t' << mid <<'\n';
if(a==1)//close to r
l = mid;
else//close to l
r= mid;
}
return l;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
22 ms |
1260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
22 ms |
1260 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
22 ms |
1260 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
595 ms |
24684 KB |
Output isn't correct - alpha = 0.000000000000 |