# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
380845 |
2021-03-23T09:42:56 Z |
VodkaInTheJar |
popa (BOI18_popa) |
C++14 |
|
127 ms |
1260 KB |
#include <bits/stdc++.h>
#include "popa.h"
using namespace std;
int attach(int root, int ver, int *left, int *right)
{
if (root == -1)
return ver;
if (query(root, ver, ver, ver))
{
left[ver] = root;
return ver;
}
right[root] = attach(right[root], ver, left, right);
return root;
}
int solve(int n, int *left, int *right)
{
left[0] = right[0] = -1;
int root = 0;
for (int i = 1; i < n; i++)
root = attach(root, i, left, right);
return root;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
94 ms |
748 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
127 ms |
1260 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
364 KB |
too many queries |
2 |
Halted |
0 ms |
0 KB |
- |