Submission #112172

#TimeUsernameProblemLanguageResultExecution timeMemory
112172someone_aaThe Big Prize (IOI17_prize)C++17
20 / 100
4 ms540 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { int li = 0; int ri = n - 1; while(li < ri) { int mid = (li + ri) / 2; vector<int>curr = ask(mid); if(curr[0] == curr[1]) return mid; if(curr[0] == 1) ri = mid - 1; else li = mid + 1; } return li; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...