# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
64468 | 2018-08-04T15:33:02 Z | TadijaSebez | popa (BOI18_popa) | C++11 | 37 ms | 460 KB |
#include "popa.h" #include <stdio.h> const int N=1050; int S[N],c; int solve(int n, int *l, int *r) { int i; int root; for(i=0;i<n;i++) { l[i]=r[i]=-1; while(c && query(S[c],i,i,i)) { l[i]=S[c]; r[S[c]]=r[i]; c--; } if(!c) root=i; else r[S[c]]=i; S[++c]=i; } return root; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 380 KB | not a valid binary tree |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 37 ms | 384 KB | not a valid binary tree |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 31 ms | 460 KB | not a valid binary tree |
2 | Halted | 0 ms | 0 KB | - |