Submission #56117

#TimeUsernameProblemLanguageResultExecution timeMemory
56117leejseoHotter Colder (IOI10_hottercolder)C++98
0 / 100
1280 ms262148 KiB
#include "grader.h" int HC(int N){ int lo = 1, hi = N; while (lo < hi){ if (hi == lo + 1){ HC(lo); if (HC(hi) == 1) return hi; return lo; } int mid = (lo + hi) >> 1; int left = Guess(lo); int middle = Guess(mid); int right = Guess(hi); if (middle == -1){ hi = mid; continue; } if (middle == 0){ return (lo+mid) >> 1; } //middle == 1 if (right == 1){ lo = mid; continue; } if (right == 0){ return (lo+hi)>>1; } if (right == -1){ lo = 1 + ((lo + mid) >> 1); hi = ((hi + mid) >> 1); } } return lo; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:12:7: warning: unused variable 'left' [-Wunused-variable]
   int left = Guess(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...