Submission #119526

#TimeUsernameProblemLanguageResultExecution timeMemory
119526PlurmHotter Colder (IOI10_hottercolder)C++11
50 / 100
760 ms8184 KiB
#include "grader.h" int HC(int N){ int lo = 1; int hi = N; int last = -1; while(lo < hi){ if(last == lo){ int r = Guess(hi); last = hi; if(r > 0){ lo = (lo + hi) / 2 + 1; }else{ hi = (lo + hi) / 2; } }else if(last == hi){ int r = Guess(lo); last = lo; if(r < 0){ lo = (lo + hi) / 2 + 1; }else{ hi = (lo + hi) / 2; } }else{ Guess(lo); int r = Guess(hi); last = hi; if(r > 0){ lo = (lo + hi) / 2 + 1; }else{ hi = (lo + hi) / 2; } } } return lo; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...