Submission #712941

#TimeUsernameProblemLanguageResultExecution timeMemory
712941tht2005The Big Prize (IOI17_prize)C++17
20 / 100
84 ms292 KiB
#include "prize.h" int find_best(int n) { int l = 0, r = n - 1; while(l <= r) { int m = (l + r) >> 1; std::vector<int> a(ask(m)); if(a[0] == 0 && a[1] == 0) { return m; } if(a[0] == 0) { l = m + 1; } else { r = m - 1; } } }

Compilation message (stderr)

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