This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |