Rosetta Problems

Energy-Saving Lighting Plan

https://atcoder.jp/contests/awc0112/tasks/awc0112_d