Rosetta Problems

Grid and Substrings

https://atcoder.jp/contests/kupc2020/tasks/kupc2020_c