#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
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 | }
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
412 KB |
Output is correct |
2 |
Correct |
58 ms |
344 KB |
Output is correct |
3 |
Correct |
7 ms |
344 KB |
Output is correct |
4 |
Correct |
45 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
211 ms |
420 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
344 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |