# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
853243 | JoksimKaktus | Hotter Colder (IOI10_hottercolder) | C++17 | 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 <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;
}