2020-06-24 23:08:16 +00:00
|
|
|
---
|
|
|
|
id: tree-euler
|
|
|
|
title: "Euler Tour on Tree"
|
2020-06-26 16:34:41 +00:00
|
|
|
author: "?"
|
2020-06-24 23:08:16 +00:00
|
|
|
prerequisites:
|
|
|
|
- Silver - Depth First Search
|
|
|
|
- Gold - Static Range Queries
|
|
|
|
- Gold - Point Update Range Sum
|
|
|
|
description: Subtree updates and queries and another way to compute lowest common ancestors.
|
2020-06-26 18:00:32 +00:00
|
|
|
frequency: 2
|
2020-06-24 23:08:16 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
import { Problem } from "../models";
|
|
|
|
|
|
|
|
export const metadata = {
|
|
|
|
problems: {
|
|
|
|
sample: [
|
2020-06-25 04:00:28 +00:00
|
|
|
new Problem("CSES", "Subtree Queries", "1137", "Easy", false, ["Euler-Tree"], "equivalent to https://judge.yosupo.jp/problem/vertex_add_subtree_sum"),
|
2020-06-24 23:08:16 +00:00
|
|
|
new Problem("CSES", "Company Queries II", "1688", "Easy", false, ["LCA"], ""),
|
|
|
|
],
|
|
|
|
problems: [
|
2020-06-25 04:00:28 +00:00
|
|
|
new Problem("CSES", "Path Queries", "1138", "Easy", false, ["Euler-Tree","PURS"], "equivalent to https://judge.yosupo.jp/problem/vertex_add_path_sum"),
|
2020-06-24 23:08:16 +00:00
|
|
|
new Problem("Gold", "Cow Land", "921", "Normal", false, ["Euler-Tree","PURS"], ""),
|
|
|
|
new Problem("Gold", "Milk Visits", "970", "Normal", false, ["Euler-Tree"], ""),
|
|
|
|
new Problem("Plat", "Promotion Counting", "696", "Normal", false, ["Euler-Tree","PURS"], ""),
|
|
|
|
new Problem("Plat", "Snow-Cow", "973", "Hard", false, ["Euler-Tree","PURS"], ""),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
## Sample Problems
|
|
|
|
|
|
|
|
<problems-list problems={metadata.problems.sample} />
|
|
|
|
|
|
|
|
## Tutorial
|
|
|
|
|
|
|
|
- CPH 18.2
|
|
|
|
- [cp-algorithms - LCA with Sparse Table](https://cp-algorithms.com/graph/lca.html)
|
|
|
|
|
|
|
|
## Problems
|
|
|
|
|
|
|
|
<problems-list problems={metadata.problems.problems} />
|