← All problemsSign in

Candle Lights

Explanation Amar returns back to his village where there is no electricity. Amar decides to buys candles to solve this problem. His village home has S rooms where he can light out candles. But every candle lasts only a certain amount of time; blue candles take x minutes, red candles take y minutes and green candles take z minutes. Amar can only replace a candle once it’s empty. However he can only

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start