← All problemsSign in

Chomp them down

You are a in a burger eating competition. You have a long line of burgers that you need to eat. To eat Burger i you need Mi minutes, and the deadline for eating this burger is Di. You need not eat a burger at a stretch. You can eat a part of it, switch to another burger, and then switch back. You've realized that it might not be possible to eat all the burgers by their deadline. So you decide to

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