Submission #89997

#TimeUsernameProblemLanguageResultExecution timeMemory
89997nikolapesic2802The Big Prize (IOI17_prize)C++14
20 / 100
2 ms572 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int l=0,r=n-1; while(true) { int m=(l+r)>>1; vector<int> tr=ask(m); if(tr[0]==1) { r=m-1; } else { if(tr[1]==1) { l=m+1; } else { return m; } } } /*for(int i = 0; i < n; i++) { std::vector<int> res = ask(i); if(res[0] + res[1] == 0) return i; } return 0;*/ }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...