Rosetta Problems

細長い屋敷 (Long Mansion)

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/658