Rosetta Problems

やさしいおばけ の たんじょうびかい (Friendly Ghost's Birthday Party)

https://atcoder.jp/contests/ijpc2012-3/tasks/ijpc_ghost