# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
54222 | radoslav11 | The Big Prize (IOI17_prize) | C++14 | 97 ms | 25400 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>
#include "prize.h"
//#include "Lgrader.cpp"
using namespace std;
template<class T, class T2> inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; }
template<class T, class T2> inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; }
const int MAXN = (1 << 20);
vector<int> memo[MAXN];
vector<int> query(int i)
{
if(memo[i].empty()) memo[i] = ask(i);
return memo[i];
}
int find_best(int n)
{
int i = 0;
while(i < n)
{
auto curr = query(i);
if(curr[0] == 0 && curr[1] == 0)
return i;
int low = i, high = n, mid, ret;
while(low <= high)
{
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |