You are given
Please find the minimum price in cents in order to obtain at least
Input Specification
First line contains 2 integers,
Next
Output Specification
Output the minimum price in cents in order to obtain at least
Subtasks
For all subtasks:
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Sample Input
Copy
5 100
5 20
9 40
3 10
8 80
6 30
Sample Output
Copy
630
Sample Explanation
Price per Box | Units available | Units bought | Prices |
Total Cost | Notes |
---|---|---|---|---|---|
Bought no boxes from factory 2 | |||||
Did not buy all 80 units | |||||
Total | Cheapest total cost |
Comments
Can anyone look at my code and tell me where I have gone wrong, or point out a test case that will highlight my missteps.
Since
can get pretty large (up to 
), simulating the purchase of every box individually will be too slow.