Rosetta Problems

Counting Spanning Trees (Undirected)

https://judge.yosupo.jp/problem/counting_spanning_tree_undirected