Submission #119545

#TimeUsernameProblemLanguageResultExecution timeMemory
119545PlurmHotter Colder (IOI10_hottercolder)C++11
52 / 100
795 ms8252 KiB
#include "grader.h" int HC(int N){ int lo = 1; int hi = N; while(hi - lo + 1 > 8){ Guess(lo); int r = Guess(hi); if(r > 0){ lo = (lo + hi)/2 + 1; }else{ hi = (lo + hi)/2; } } int last = -1; for(int i = lo; i <= hi; i += 2){ int cur = Guess(i); if(last == -1){ last = cur; continue; } if(cur == -1) return i-2; if(cur == 0) return i-1; last = cur; } if((hi - lo) % 2 == 1){ int cur = Guess(hi); if(cur == 1) return hi; else return hi-1; } return hi; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...