# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1089926 |
2024-09-17T12:02:43 Z |
lucri |
popa (BOI18_popa) |
C++17 |
|
211 ms |
420 KB |
#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 | }
| ^
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
211 ms |
420 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
344 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |