--- slug: /plat/trees title: "Platinum - Trees" author: Benjamin Qi --- # Platinum - Trees ## Tree Diameter ### Tutorial - CPH 14.2 ### Problems - [USACO Plat Newbarns](http://www.usaco.org/index.php?page=viewproblem2&cpid=817) - Copy of [Brain Network "Hard"](https://codeforces.com/contest/690/problem/C3) ## Lowest Common Ancestor ### Tutorial - CPH 18 - [cp-algorithms: Lowest Common Ancestor](https://cp-algorithms.com/) ### Problems - [USACO Plat Max Flow](http://www.usaco.org/index.php?page=viewproblem2&cpid=576) - [USACO Gold Milk Visits](http://www.usaco.org/index.php?page=viewproblem2&cpid=970) - [USACO Gold Cow Land](http://www.usaco.org/index.php?page=viewproblem2&cpid=921) - LCA + BIT - [USACO Plat Promote](http://www.usaco.org/index.php?page=viewproblem2&cpid=696) - Subtree + BIT - [USACO Plat Disrupt](http://www.usaco.org/index.php?page=viewproblem2&cpid=842) - HLD is possible, but just do binary jumps - [USACO Plat Tree Boxes](http://www.usaco.org/index.php?page=viewproblem2&cpid=948) - interactive!! - [USACO Plat Gathering](http://www.usaco.org/index.php?page=viewproblem2&cpid=866) - [USACO Plat Exercise](http://www.usaco.org/index.php?page=viewproblem2&cpid=901) - tricky ## Centroid Decomposition - [USACO Plat - At Large](http://www.usaco.org/index.php?page=viewproblem2&cpid=793) - very tricky - [DMOJ Bob Equilibrium](https://dmoj.ca/problem/dmopc19c7p6) ## Heavy-Light Decomposition