← All problemsSign in

CAKE-SLIDE

Chef has a big day ahead. He is to perform $N$ tasks in sequence, each with cruiciality level $A$i. He has energy $E$ at the start of the day. Whenever performing a particular task $i$: - If his current energy $E$ equals cruiciality level $A$$i$, then after performing the task his energy decreases by an amount $K$. - If his current energy $E$ is more than cruiciality level $A$$i$, then after perfo

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