# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
370553 |
2021-02-24T06:01:17 Z |
arnold518 |
popa (BOI18_popa) |
C++14 |
|
56 ms |
492 KB |
#include "popa.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int N, *L, *R;
int f(int l, int r)
{
if(l>r) return -1;
if(l==r) return l;
for(int i=l; i<=r; i++)
{
if(query(l, r, i, i))
{
L[i]=f(l, i-1);
R[i]=f(i+1, r);
return i;
}
}
}
int solve(int _N, int *_L, int *_R)
{
N=_N; L=_L; R=_R;
return f(0, N-1);
}
Compilation message
popa.cpp: In function 'int f(int, int)':
popa.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
24 | }
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
364 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
56 ms |
492 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
18 ms |
364 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |