Rosetta Problems

現代的な屋敷 (Modern Mansion)

https://atcoder.jp/contests/joi2013ho/tasks/joi2013ho3