Rosetta Problems

蛇行する文字列

https://atcoder.jp/contests/past17-open/tasks/past17_g