Submission #781495

#TimeUsernameProblemLanguageResultExecution timeMemory
781495OrazBThe Big Prize (IOI17_prize)C++14
20 / 100
83 ms300 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int l = 0, r = n-1; while(l <= r){ int md = (l+r)/2; vector<int> a = ask(md); if (!a[0] and !a[1]) return md; if (a[0] > a[1]) r = md - 1; else l = md + 1; } }

Compilation message (stderr)

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