#P2517. [HAOI2010] 订货
[HAOI2010] 订货
Description
A company estimates that in month the market demand for a certain product is . It is known that the unit purchase price in month is . For each unit of product that remains unsold at the end of a month and is carried over to the next month, a storage fee of must be paid. Assume the initial inventory at the beginning of month is , and the inventory at the end of month is also . How should the ordering plan for these months be arranged to minimize the total cost?
Orders are placed at the beginning of each month. After ordering, products arrive immediately, enter the warehouse, and supply the market. If a unit is sold within the same month, no storage fee is charged for it. Assume the warehouse capacity is .
Input Format
Line : $n, m, S \ (0\le n\le50, 0\le m\le10, 0\le S\le10000)$.
Line : .
Line : .
Output Format
Only line, an integer representing the minimum cost.
3 1 1000
2 4 8
1 2 4
34
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号