Submission #206413

#TimeUsernameProblemLanguageResultExecution timeMemory
206413anonymousThe Big Prize (IOI17_prize)C++14
0 / 100
5 ms376 KiB
#include "prize.h" #include<vector> #include<map> #include<utility> using namespace std; map<int, map<int, pair<int,int> > > M; int slv(int l, int r) { if (l == r) {return(l);} int mid = (l + r) >> 1; vector<int> res = ask(mid); int s = res[0] + res[1]; if (s == 0) {return(mid);} if (res[0]) {slv(l,mid-1);} if (res[1]) {slv(mid+1,r);} } int find_best(int n) { return(slv(0, n-1)); }

Compilation message (stderr)

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