#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int N){
int l = 1;
int r = N;
bool changed = 0;
int b , a;
while(l != r)
{
int mid = (l + r) / 2;
if(changed == 1)
{
b = Guess(r);
a = Guess(l);
}
else
{
a = Guess(l);
b = Guess(r);
}
//cout << a << " " << b << " " <<l << " " <<r << '\n';
if((changed == 1 && a==0) || (changed ==0 && b ==0))
{
//cout << mid << "ignore rest \n";
return mid;
break;
}
else if(b ==1)
{
l = mid + 1;
changed = 0;
}
else
{
r = mid;
changed = 1;
}
}
//cout << l;
return l;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
25 ms |
15960 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
25 ms |
17752 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
25 ms |
15952 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
493 ms |
136784 KB |
Output isn't correct - alpha = 0.000000000000 |
2 |
Halted |
0 ms |
0 KB |
- |