Rosetta Problems
← atcoder に戻る
Directed Graph and Query
https://atcoder.jp/contests/abc287/tasks/abc287_h