# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
923789 | n3rm1n | Ball Machine (BOI13_ballmachine) | C++17 | 67 ms | 14796 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
const int MAXN = 1e5 + 10;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
int n, que;
int p[MAXN], root;
vector < int > g[MAXN];
void read()
{
cin >> n >> que;
for (int i = 1; i <= n; ++ i)
{
cin >> p[i];
if(!p[i])root = i;
else g[p[i]].push_back(i);
}
}
int points[MAXN], cnt;
int sub[MAXN];
void dfs00(int beg)
{
sub[beg] = beg;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |