# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164137 | combi1k1 | Mergers (JOI19_mergers) | C++14 | 1760 ms | 149012 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 N = 5e5 + 1;
vector<int> g[N];
vector<int> a[N];
vector<int> s[N];
int st[N], en[N];
int tot = 0;
int f[N];
int h[N];
int p[N][20];
int dfs(int u) {
st[u] = ++tot;
for(int i = 0 ; i < 16 ; ++i)
p[u][i + 1] = p[p[u][i]][i];
for(int v : g[u]) if (v != p[u][0]) {
h[v] = h[u] + 1;
p[v][0] = u;
dfs(v);
}
en[u] = tot;
return 1;
}
# | 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... |