mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-30 18:56:26 +00:00
fix(AcWing/1279): Heavy Path Decomposition
This commit is contained in:
parent
0b2e3efdac
commit
75e3ad0224
@ -8,7 +8,7 @@ int n, m, u, v, c, color[N];
|
|||||||
char op;
|
char op;
|
||||||
vector<int> g[N];
|
vector<int> g[N];
|
||||||
|
|
||||||
// Link-cut Tree
|
// Heavy Path Decomposition
|
||||||
int cnt, dep[N], id[N], siz[N], fa[N], son[N], top[N], w[N];
|
int cnt, dep[N], id[N], siz[N], fa[N], son[N], top[N], w[N];
|
||||||
void dfs1(int, int);
|
void dfs1(int, int);
|
||||||
void dfs2(int u, int t);
|
void dfs2(int u, int t);
|
||||||
@ -48,7 +48,7 @@ int main() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// === Link-cut Tree ===
|
// === Heavy Path Decomposition ===
|
||||||
|
|
||||||
void dfs1(int u, int f) {
|
void dfs1(int u, int f) {
|
||||||
dep[u] = dep[f] + 1;
|
dep[u] = dep[f] + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user