# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
26715 | 2017-07-05T10:11:55 Z | baactree | Hotter Colder (IOI10_hottercolder) | C++14 | 0 ms | 0 KB |
#include "grader.h" int HC(int N){ int le,ri; le=1; ri=N; while(true){ int a=(le*2+ri)/3; int b=(le+ri*2)/3; int g=Guess(a); int p=Guess(b); if(p==0){ return (a+b)/2; } else if(p>0){ le=(a+b)/2+1; } else{ if((a+b)%2==0) ri=(k*3)/2-1; else ri=(k*3)/2; } if(le==ri) return le; } return 0; }