Rocket Pack
Chef's robot starts from the coordinate $(0, 0)$ and wishes to reach to the coordinate $(N, M)$. The initial energy of the robot is $0$. There are $K$ `batteries` kept at some of the coordinates such that picking up the $i^{th}$ `battery` costs $C_i$ units, and, on picking the $i^{th}$ `battery`, the current energy of the robot becomes $E_i$. Note that one coordinate can have multiple `batteri
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.
Sign in to chat with the tutor and save your progress.
Sign in to start