# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
804694 | Ellinor | The Big Prize (IOI17_prize) | C++14 | 1 ms | 344 KiB |
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>
using namespace std;
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
#include "prize.h"
int find_best(int n)
{
int ans;
int low = 0, high = n - 1;
int mid;
while (low <= high)
{
mid = (low + high) / 2;
std::vector<int> res = ask(mid);
if(res[0] + res[1] == 0) ans = mid;
if (res[0] > res[1]) high = mid - 1;
else low = mid + 1;
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |