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 rezolva(int b,int e,int* Left,int* Right)
{
if(b>e)
return -1;
for(int i=b;i<=e;++i)
if(query(i,i,b,e)==1)
{
Left[i]=rezolva(b,i-1,Left,Right);
Right[i]=rezolva(i+1,e,Left,Right);
return i;
}
}
int solve(int N, int* Left, int* Right)
{
return rezolva(0,N-1,Left,Right);
}
Compilation message (stderr)
popa.cpp: In function 'int rezolva(int, int, int*, int*)':
popa.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
14 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |