Submission #422901

#TimeUsernameProblemLanguageResultExecution timeMemory
422901albertolg101The Big Prize (IOI17_prize)C++17
0 / 100
105 ms328 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { vector<int> ar; /* for(int i = 0 ; i < n ; i += 2) { ar = ask(i); if(ar[0] + ar[1] == 0) { return i; } if(ar[1] == 0) { return i - 1; } } */ for(int i = 0 ; i < n ; i++) { vector<int> ar = ask(i); if(ar[0] + ar[1] == 0) return i; } return n - 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...