My issue was that the size of my DP array was too small. Missed a 0.
About the solution, try to think of it like induction.
If I know the solution to the previous checkpoints, can I decide on what to do at this current checkpoint?
Ask what minimal information you might need about the previous steps, to make a decision about the i-th checkpoint. (If I know the minimum amount of time required to go through the previous checkpoints with/without using a switch, can I figure out the minimum amount of time after going though this checkpoint with/without using a switch?)