# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
645736 |
2022-09-27T18:49:19 Z |
Kripton |
popa (BOI18_popa) |
C++14 |
|
52 ms |
304 KB |
#include <bits/stdc++.h>
#include "popa.h"
using namespace std;
int st[1001],dr[1001];
int solutioneaza(int sta,int dre)
{
if(sta==dre)
return sta;
for(int i=sta;i<=dre;i++)
if(query(sta,dre,i,i)==1)
{
if(i!=sta)
st[i]=solutioneaza(sta,i-1);
if(i!=dre)
dr[i]=solutioneaza(i+1,dre);
return i;
}
return -1;
}
int solve(int n,int *Left, int *Right)
{
memset(st,-1,sizeof(st));
memset(dr,-1,sizeof(dr));
int x=solutioneaza(0,n-1);
Left=st;
Right=dr;
return x;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
304 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
52 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
20 ms |
208 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |