# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1089935 | lucri | popa (BOI18_popa) | C++17 | 7 ms | 600 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>
int query(int a,int b,int c,int d);
int t[1010];
int tata(int nod)
{
if(t[nod]==0)
return nod;
return tata(t[nod]);
}
int solve(int N, int* Left, int* Right)
{
int n=N;
for(int i=0;i<n;++i)
{
t[i]=0;
Left[i]=Right[i]=-1;
}
for(int i=0;i+1<n;++i)
{
if(query(i+1,i+1,i,i+1)==true)
{
int x=tata(i);
t[x]=i+1;
Left[i+1]=x;
}
else
{
t[i+1]=i;
Right[i]=i+1;
}
}
for(int i=0;i<n;++i)
if(t[i]==0)
return i;
}
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... |