Rosetta Problems

君が望むなら世界中全てのたこ焼きを赤と青に染め上げよう

https://atcoder.jp/contests/arc014/tasks/arc014_1