This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/6_Plat/HLD.mdx
2020-06-28 18:12:20 -07:00

45 lines
No EOL
1.9 KiB
Text

---
id: hld
title: "Heavy-Light Decomposition"
author: Benjamin Qi
prerequisites:
- Gold - Euler Tour Technique
- Platinum - Range Update Range Query
description: Path and subtree updates and queries.
frequency: 1
---
import { Problem } from "../models";
export const metadata = {
problems: {
sample: [
new Problem("CSES", "Company Queries II", "1688", "Intro", false, ["LCA"], ""),
new Problem("YS","Vertex Set Path Composite","vertex_set_path_composite", "Easy", false, ["HLD"], ""),
],
general: [
new Problem("Gold", "Cow Land", "921", "Easy", false, ["Euler-Tree","PURS", "HLD"], ""),
new Problem("Plat", "Disrupt", "842", "Easy", false, ["HLD"], ""),
new Problem("Old Gold", "Grass Planting", "102", "Easy", false, ["HLD"], ""),
new Problem("HR", "Subtrees & Paths", "https://www.hackerrank.com/challenges/subtrees-and-paths", "Easy", false, ["HLD"], ""),
new Problem("CF", "Tree Queries", "contest/1254/problem/D", "Normal", false, ["HLD"], ""),
new Problem("ojuz", "JOI - Cats or Dogs", "https://oj.uz/problem/view/JOI18_catdog", "Hard", false, ["HLD"], ""),
new Problem("wcipeg", "COI 08-Otoci", "https://wcipeg.com/problem/coi08p2", "Hard", false, ["HLD"], "editorial available online"),
],
}
};
<problems-list problems={metadata.problems.sample} />
## Tutorial
<resources>
<resource source="cp-algo" title="HLD" url="https://cp-algorithms.com/graph/hld.html" starred> </resource>
<resource source="CF" title="AI-Cash - HLD Implementation" url="blog/entry/22072" starred></resource>
<resource source="CF" title="adamant - Easiest HLD with subtree queries" url="blog/entry/53170" starred></resource>
<resource source="anudeep2011" title="HLD" url="https://blog.anudeep2011.com/heavy-light-decomposition/">explains what HLD is (but incomplete & overly complicated code)</resource>
</resources>
## Problems
<problems-list problems={metadata.problems.general} />