You are given five integers: cost1, cost2, costBoth, need1, and need2.
There are three types of items available for purchase:
An item of type cost1 and provides
An item of type cost2 and provides
An item of type costBoth and provides
Return the minimum total cost needed to acquire at least need1 units of type need2 units of type
Constraints:
cost1, cost2, costBoth
need1, need2
You are given five integers: cost1, cost2, costBoth, need1, and need2.
There are three types of items available for purchase:
An item of type cost1 and provides
An item of type cost2 and provides
An item of type costBoth and provides
Return the minimum total cost needed to acquire at least need1 units of type need2 units of type
Constraints:
cost1, cost2, costBoth
need1, need2