Submission #41061

#TimeUsernameProblemLanguageResultExecution timeMemory
41061ljk0411jgHotter Colder (IOI10_hottercolder)C++14
0 / 100
775 ms140524 KiB
#include "grader.h" int HC(int N) { int l, r, ret1, ret2, mid, result = 1; r = N; ret1 = Guess(r); l = 1; ret2 = Guess(l); mid = (l + r) / 2; while (l <= r) { if (l == r) { result = l; break; } if (ret2 == 0) { result = mid; break; } else if (ret2 > 0) { r = mid; if (r == 0) { result = 1; break; } ret2 = Guess(r); } else { l = mid + 1; if (l == N + 1) { result = N; break; } ret2 = Guess(l); } mid = (l + r) / 2; } return result; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:4:12: warning: variable 'ret1' set but not used [-Wunused-but-set-variable]
  int l, r, ret1, ret2, mid, result = 1;
            ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...