# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
26714 | baactree | Hotter Colder (IOI10_hottercolder) | C++14 | 0 ms | 0 KiB |
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"
int HC(int N){
int le,ri;
le=1;
ri=N;
while(true){
int k=(n+2)/3;
int g=Guess(k);
int p=Guess(k*2);
if(p==0){
return (k*3)/2;
}
else if(p>0){
le=(k*3)/2+1;
}
else{
if(k&1)
ri=(k*3)/2;
else
ri=(k*3)/2-1;
}
if(le==ri)
return le;
}
return 0;
}