会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
can丶
博客园
首页
新随笔
联系
管理
订阅
2017年11月3日
问题陈述: 给定n种物品和一个背包.物品i的重量是Wi,其价值为Vi,背包的容量为C.在选 择物品i装入背包时,可以选择物品i的一部分,1<= i <=n.问应如何选择装入背包 中的物品,使得装入背包中物品的总价值最大.
摘要: 贪心算法 #include <stdio.h>#include<malloc.h>#include<string.h>#define HASH_LEN 50#define M 47#define NAME_NO 30 typedef struct NAME{char *py; //名字的拼音int
阅读全文
posted @ 2017-11-03 22:57 can丶
阅读(3627)
评论(0)
推荐(0)
编辑
公告