# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
292733 | Kastanda | The Big Prize (IOI17_prize) | C++11 | 67 ms | 19576 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.
// M
#include<bits/stdc++.h>
#include "prize.h"
using namespace std;
const int N = 400005;
int n, GRes, MX;
vector < int > A[N];
inline void Ask(int i)
{
if (!A[i].size())
A[i] = ask(i);
}
void Solve(int l, int r, int k, int le = 0, int ri = 0)
{
//printf("%d :: %d :: %d\n", l, r, k);
if (r <= l || k == 0)
return ;
if (GRes != -1)
return ;
if (r - l == 1)
{
Ask(l);
if (A[l][0] + A[l][1] == 0)
GRes = l;
return ;
}
int md1 = (l + r) >> 1;
int md2 = md1;
int cc = 0;
while (md2 < r)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |