Submission #781286

#TimeUsernameProblemLanguageResultExecution timeMemory
781286OrazBThe Big Prize (IOI17_prize)C++14
20 / 100
1 ms296 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] == 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...