Submission #41028

#TimeUsernameProblemLanguageResultExecution timeMemory
41028esspks21Hotter Colder (IOI10_hottercolder)C++14
50 / 100
815 ms8204 KiB
#include "grader.h" int HC(int N) { int left = 1; int right = N; while (left <= right) { if (left == right) return (left + right) >> 1; Guess(left); int temp = Guess(right); if (temp == 0) // same return (left + right) / 2; if (temp == 1) // hotter left = (left + right) / 2 + 1; if (temp == -1) // colder right = (left + right) / 2; } }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...