Sponsored
Use these hints if you're stuck. Try solving on your own first.
Consider a strategy where the choice of bulb with number i is increasing. In such a strategy, you no longer need to worry about bulbs that have been set to the left.
Solve with full IDE support and test cases