# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15934 | myungwoo | Toll (APIO13_toll) | C++14 | 2246 ms | 7588 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;
#define MAXN 100005
#define MAXM 300005
#define pb push_back
#define sz(v) ((int)(v).size())
typedef long long lld;
int N, M, K, C;
int A[MAXN];
int par[MAXN], num[MAXN], H[23], tpar[23];
int up[23];
lld subtree_sz[23], sz[23];
vector <int> con[23], tcon[23], tconv[23];
struct EDGE{
int a, b, c;
bool in_mst, is_critical;
} E[MAXM], F[21];
int cp(int n){ return par[n] == n ? n : (par[n] = cp(par[n])); }
void dfs(int n, int from)
{
subtree_sz[n] = sz[n];
for (int i=sz(tcon[n]);i--;){
int t = tcon[n][i], v = tconv[n][i];
if (t == from) continue;
H[t] = H[n] + 1; up[t] = v; tpar[t] = n; dfs(t, n);
# | 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... |