Rosetta Problems

Counting Spanning Trees (Directed)

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