Lights Off

Hi, I’ve been trying to solve this problem for a couple days now, and I just can’t seem to find the necessary DP states.

I know that we can only use the switch configuration plus some limited information about the lights, but I’m not sure what information we can exactly gather that can fit in \mathcal{O}(N) states.