Submission #523601

#TimeUsernameProblemLanguageResultExecution timeMemory
523601dron_rpThe Big Prize (IOI17_prize)C++14
20 / 100
95 ms328 KiB
#include "prize.h" using namespace std; int find_best(int n) { int lo = 0, hi = n-1; while (lo<=hi){ int mid = lo + (hi-lo)/2; vector<int> ans = ask(mid); if (ans[0] == 0 && ans[1] == 0) return mid; else if (ans[0] > ans[1]){ hi = mid-1; } else{ lo = mid+1; } } }

Compilation message (stderr)

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