#include<bits/stdc++.h>
#include"grader.h"
using namespace std;
int HC(int n){
if (n == 1)
return 1;
int l = 1, r = n, type = 0;
Guess(l);
while (true){
if (!type){
int x = Guess(r);
if (x == 0)
return (l + r) / 2;
if (x == 1){
l = (l + r) / 2;
type = 1;
} else {
r = (l + r) / 2;
type = 0;
}
} else {
int x = Guess(l);
if (x == 0)
return (l + r) / 2;
if (x == 1){
r = (l + r) / 2;
type = 0;
} else {
l = (l + r) / 2;
type = 1;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
39 ms |
15096 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
39 ms |
15116 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
41 ms |
15180 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
687 ms |
154028 KB |
Output isn't correct - alpha = 0.000000000000 |