| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 145017 | MKopchev | popa (BOI18_popa) | C++14 | 19 ms | 472 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<popa.h>
using namespace std;
/*
int query(int a,int b,int c,int d)
{
}
*/
int solve(int l,int r,int* Left,int* Right)
{
if(l==r)
{
Left[l]=-1;
Right[l]=-1;
return l;
}
if(l>r)return -1;
vector<int> order={};
for(int i=l;l+i<=r-i;i++)
{
order.push_back(l+i);
order.push_back(r-i);
}
for(auto i:order)
if(query(l,r,i,i))
{
Left[i]=solve(l,i-1,Left,Right);
Right[i]=solve(i+1,r,Left,Right);
return i;
}
}
int solve(int N, int* Left, int* Right)
{
return solve(0,N-1,Left,Right);
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
