Chocolate Manufacturing Company
CodeChefOpen on judge ↗
A chocolate manufacturing company wants to buy boxes to pack chocolates. Boxes are available in two types, first one costs c1 and can hold n1 chocolates and the second one costs c2 and can hold n2 chocolates. Each box to be filled to its capacity. You have to find the best way to distribute the chocolates such that total cost is minimized. Input The first line specifies the number of test cases.
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