Rosetta Problems

Many Graph Queries(★7)

https://atcoder.jp/contests/typical90/tasks/typical90_bg