#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
//int Guess(int x) {
// cout << x << endl;
// int a;
// cin >> a;
// return a;
//}
int HC(int n) {
int l, r, last;
l = 1;
r = n;
Guess((l + r) / 2);
last = (l + r) / 2;
while(l < r) {
int mid = (l + r) / 2;
int x = Guess((l + mid) / 2);
if(x == 0) {
return (last + (l + mid) / 2) / 2;
} else if(x == 1) {
r = mid;
} else {
l = mid + 1;
}
}
return l;
}
//int main() {
// int n;
// cin >> n;
// cout << HC(n) << endl;
// return 0;
//}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
27 ms |
17492 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
17416 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
22 ms |
17492 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
345 ms |
156688 KB |
Output isn't correct - alpha = 0.000000000000 |
2 |
Halted |
0 ms |
0 KB |
- |