Rosetta Problems

Shortest Good Path

https://atcoder.jp/contests/abc244/tasks/abc244_f