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){
Guess(l);
int a = Guess(r);
if(a==-1)//close to r
r = (l+r-1)/2;
else if(a==1)//close to l
l = (l+r+1)/2;
else return (l+r)/2;
}
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... |