Submission #101940

#TimeUsernameProblemLanguageResultExecution timeMemory
101940joylintpThe Big Prize (IOI17_prize)C++17
20 / 100
3 ms512 KiB
#include<bits/stdc++.h> #include"prize.h" #define INF 2147483647 using namespace std; int find_best(int n) { int l = -1, r = n; vector<int> res = {INF, INF}; while (1) { int tmp = (l + r) / 2; res = ask(tmp); if (res[0] > res[1]) r = tmp; else if (res[1] > res[0]) l = tmp; else return (l + r) / 2; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...