← All problemsSign in

Manufacturing Goods

There are N factories numbered from 1 to N. For each of the factory you are given the maximum units of product it can manufacture (say B where Bi denotes the max limit of ith factory) and the cost of manufacturing per unit product (say C where Ci denotes the cost of manufacturing of ith factory). For each of the factory you are given the amount of product it needs to produce (say A where Ai denot

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