【解题报告】【HDOJ1114】【完全背包】Piggy-Bank
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1114注:1.01背包使用的是逆序,完全背包使用的顺序。2.此题不是求最大,而是在满足背包全满的条件下,使之价值最小,也就是求最低下限。 1 #include<stdio.h> 2 #include<string.h> 3 #define MAX 501 4 #define INF 0x3f3f3f3f 5 #define min(a,b) (a>b?b:a) 6 int main() 7 { 8 long int weight[MAX],value[MAX],reco 阅读全文
posted @ 2012-07-21 18:49 coding封神 阅读(116) 评论(0) 推荐(0) 编辑