Submission #68699

#TimeUsernameProblemLanguageResultExecution timeMemory
68699TalantThe Big Prize (IOI17_prize)C++17
20 / 100
4 ms600 KiB
#include "prize.h" //#include "grader.cpp" #include <bits/stdc++.h> #define sc second #define fr first #define pb push_back #define mk make_pair using namespace std; int find_best(int n) { int l = 0,r = n - 1; while (r - l > 1) { int m = (r + l) >> 1; vector <int> v = ask(m); if (v[0] + v[1] == 0) return m; if (v[0] > v[1]) r = m; else l = m; } vector<int> v = ask(l); if (v[0] + v[1] == 0) return l; return r; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...