This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int N){
if ( N == 1 ) {
return 1;
}
int l = 1, r = N;
while ( r - l > 1 ) {
int md = (l + r) / 2;
Guess((l + md) / 2);
int y = Guess((md + r) / 2);
if ( y == 1 ) {
l = md;
}
else if ( y == -1 ) {
r = md;
}
else {
return md;
}
}
Guess(l);
if ( Guess(r) == 1 ) {
return r;
}
else {
return l;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |