# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129637 | luciocf | Cat in a tree (BOI17_catinatree) | C++14 | 495 ms | 38636 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>
using namespace std;
const int maxn = 2e5+10;
const int inf = 1e9+10;
int n, D;
int order[maxn];
int sz[maxn], nivel[maxn];
int pai[maxn], dist[maxn][20];
int sub[maxn];
bool mark[maxn];
vector<int> grafo[maxn];
void dfsPre(int u, int p)
{
for (auto v: grafo[u])
{
if (v == p) continue;
nivel[v] = nivel[u]+1;
dfsPre(v, u);
}
}
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... |