Rosetta Problems

Counting of Trees

https://atcoder.jp/contests/nikkei2019-2-qual/tasks/nikkei2019_2_qual_b