Rosetta Problems

Palace Guards

https://atcoder.jp/contests/awc0177/tasks/awc0177_b