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){
int l = 1, r = N;
while ( l < r ) {
int m = (l + r) / 2;
// cout << l << ' ' << m << ' ' << r << '\n';
Guess(l);
int b = Guess(r);
if ( b == 1 ) {
l = m + 1;
}
else if ( b == -1 ) {
if ( l % 2 == r % 2 ) {
r = m - 1;
}
else {
r = m;
}
}
else {
return m;
}
}
return r;
}
# | 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... |