#BZOJ2424. 订货

订货

No submission language available for this problem.

题目描述

某公司估计市场在第i个月对某产品的需求量为Ui,已知在第i月该产品的订货单价为di,上个月月底未销完的单位产品要付存贮费用m,假定第一月月初的库存量为零,第n月月底的库存量也为零,问如何安排这n个月订购计划,才能使成本最低?每月月初订购,订购后产品立即到货,进库并供应市场,于当月被售掉则不必付存贮费。假设仓库容量为S。

输入格式

第1行:n, m, S (0<=n<=50, 0<=m<=10, 0<=S<=10000)
第2行:U1 , U2 , ... , Ui , ... , Un (0<=Ui<=10000)
第3行:d1 , d2 , ..., di , ... , dn (0<=di<=100)

输出格式

<p class="MsoNormal" style="mso-margin-bottom-alt:auto;margin-left:17.7pt;

text-indent:-17.7pt;mso-char-indent-count:-1.47"><b style="mso-bidi-font-weight:

normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman"">只有</span></b>1<span style="font-size:12.0pt;font-family:

宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">行,一个整数,代表最低成本</span></b> <o:p></o:p>

</p>

3 1 1000
2 4 8
1 2 4
34