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 <bits/stdc++.h>
#include "grader.h"
using namespace std;
int HC(int N_){
int l = 1; int r = N_;
int g = r;
Guess(l);
int res;
while(true){
int k = Guess(g);
int mid = (l+r)/2;
if(k == 0){
res = mid;
break;
}else if(k == 1){
if(g != r){
Guess(r);
}
l = mid;
g = l;
}else{
if(g != l){
Guess(l);
}
r = mid;
g = r;
}
}
return res;
}
# | 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... |