# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
61998 |
2018-07-27T08:23:55 Z |
노영훈(#1796) |
popa (BOI18_popa) |
C++11 |
|
19 ms |
936 KB |
#include "popa.h"
#include <iostream>
using namespace std;
static const int MX=1010;
int my_q(int x, int l, int r){
return query(x,x,l,r);
}
static int n;
static int *Lson, *Rson;
static int tree[1<<13];
static int init(int v, int s, int e){
if(s==e) return tree[v]=s;
int m=(s+e)/2;
int l=init(v*2, s, m), r=init(v*2+1, m+1, e);
if(my_q(l,s,e)){
tree[v]=l;
Rson[m]=r;
}
else{
tree[v]=r;
Lson[m+1]=l;
}
// cout<<s<<' '<<e<<": "<<tree[v]<<'\n';
return tree[v];
}
int solve(int N, int _Lson[], int _Rson[]){
n=N; Lson=_Lson, Rson=_Rson;
for(int i=0; i<n; i++) Lson[i]=Rson[i]=-1;
int root=init(1,0,n-1);
// for(int i=0; i<n; i++) cout<<Lson[i]<<' ';
// cout<<'\n';
// for(int i=0; i<n; i++) cout<<Rson[i]<<' ';
// cout<<'\n';
return root;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
632 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
16 ms |
936 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
19 ms |
936 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |