Rosetta Problems

Weighting a Tree

https://atcoder.jp/contests/awc0164/tasks/awc0164_a