Rosetta Problems

Broken Christmas Tree

https://atcoder.jp/contests/xmascontest2015/tasks/xmascontest2015_b