# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
932995 | sheldon | Cat Exercise (JOI23_ho_t4) | C++14 | 321 ms | 64108 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 nax = 2e5 + 5;
int height[nax], who[nax], up[nax][19], leader[nax], depth[nax];
long long dp[nax];
vector<int> edges[nax];
struct S {
vector<int> members;
int mx = 0;
};
S comp[nax];
void dfs (int u, int p) {
up[u][0] = p;
depth[u] = depth[p] + 1;
for (int i = 1; i < 19; ++i) {
up[u][i] = up[up[u][i - 1]][i - 1];
}
for (int v : edges[u]) {
if (v != p) {
dfs (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... |
# | 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... |