Rosetta Problems

Lighting Panels and Picture Frames

https://atcoder.jp/contests/awc0130/tasks/awc0130_d