← All problemsSign in

Chef and the Orders

CodeChefRating 3187Open on judge ↗

Chef gets N orders. The orders are numbered from 1 to N. He gets order i at Si time, and this order contains Xi number of items. Chef needs to serve each of these Xi items before Di time and for each unit of items he cannot cook before this deadline he needs to pay Pi unit of money as penalty. Given all of the orders, help the Chef to minimize the penalty he will have to pay. Important Note: Chef

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