背包九讲练习题
摘要:
01背包 有N种物品和一个容量为V的背包,每种物品只有1个,第i种物品的体积为v[i],价值为w[i]。问将哪些物品装入背包,可使总体积不超过背包容量,且总价值最大,输出最大值。 0<N,V<=1000; 0<v[i],w[i]<=1000 分析:标准01背包,每样物品按选和不选进行转移,时间复杂度 阅读全文
posted @ 2025-01-12 21:27 chenfy27 阅读(13) 评论(0) 推荐(0)
2025年1月12日 #
posted @ 2025-01-12 21:27 chenfy27 阅读(13) 评论(0) 推荐(0)
posted @ 2025-01-12 19:48 chenfy27 阅读(17) 评论(0) 推荐(0)
posted @ 2025-01-12 17:02 chenfy27 阅读(86) 评论(0) 推荐(0)
posted @ 2025-01-12 15:25 chenfy27 阅读(46) 评论(0) 推荐(0)
posted @ 2025-01-12 15:21 chenfy27 阅读(6) 评论(0) 推荐(0)