Submission #1006222

#TimeUsernameProblemLanguageResultExecution timeMemory
1006222ElenaBMThe Big Prize (IOI17_prize)C++17
20 / 100
49 ms596 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 m = (l+r)/2; vector<int> s = ask(m); if (s[0]) r= m-1; else if (s[1]) l = m+1; else return m; } }

Compilation message (stderr)

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