Module Rerooting

Rerooting

**Frequency: 3/10** Reroot the tree to calculate new answer for the new root.

Resources

- [USACO: DP on Trees - Solving For All Roots ](https://usaco.guide/gold/all-roots?lang=cpp)

Problems

Tree distance 89 / 95 1400
Tree distance 2 89 / 89 1500
Tree weight 61 / 65 1600
World tree 9 / 9 2000