Submission #289129

#TimeUsernameProblemLanguageResultExecution timeMemory
289129JoMeeThe Big Prize (IOI17_prize)C++17
20 / 100
50 ms384 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int res = -1; void q(int l,int r){ if(res != -1)return; int m = (l+r)/2; vector<int> qu = ask(m); if(qu[0]+qu[1] == 0){ res = m; return; } if(qu[0] > 0){ if(m != r) q(l,m); } if(qu[1] > 0){ if(m != l) q(m,r); } } int find_best(int n) { q(0,n); return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...