-
0
说明: 给定n种物品和一个背包,物品i的重量是Wi,价值是vi,被包容量是C,应该如何选择装入被包的物品,使得装入背包中物品的总价值最大?对于每种物品i,只有两种选择,装入或者不装入.
输入:第一行两个正整数n(物品数)和C(容量)
第二行n个正整数n,表示物品价值
第三行n个正整数n,表示物品重量
输出:第一行表示总价值
第二行n个数(0/1),0表示物品不装入,1表示装入
例如,
输入:
5 10
6 3 5 4 6
2 2 6 5 4
输出
15
1 1 0 0 1
(Species of a given n items and a backpack, the weight of item i is Wi, the value of vi, was packet capacity is C, should be how to choose a package of items to be loaded, the backpack load in the largest total value of goods? For each item i, there are only two options, loaded or not loaded. Input: the first line of the two positive integer n (the number of items) and C (capacity) of the second line of n positive integer n, that the value of the third line of n positive integer n, that the weight of output: the total value of the first line of the second line, said n number of (0/1), 0 that the items do not load, that load 1 for example, enter: 5,106,354,622 6 5 4 output 15 1 1 0 0 1)
- 2009-07-01 23:07:01下载
- 积分:1
-
saolei
这是一本很经典的教程!不知道有人传过没有。先传上来,希望有用(This is a very classic tutorial! Some people do not know they could not mass. Chuan-first onto the hope that useful)
- 2008-03-24 18:38:04下载
- 积分:1
-
MUSICdoc
一篇music算法的文档,名字为基于均匀线阵的改进MUSIC算法(Algorithm is a music document, the name is based on uniform linear array MUSIC algorithm for improved)
- 2011-05-21 19:18:39下载
- 积分:1
-
BPSK_Done
基于的BPSK的matlab,完整的程序,有能相关的说明和注释,有需要的朋友下载吧~(Based on the matlab BPSK, complete program and relevant instruction and comments, the need to download friends ~)
- 2011-11-15 13:26:12下载
- 积分:1
-
LBG
进行频域处理的必备程序,学信号的人一定要顶下(Essential for frequency domain processing procedures, the person must learn the signal under the top)
- 2011-10-04 09:53:23下载
- 积分:1
-
guifanbiancheng
说明: 规范编程,规格编程习惯,,,,,,,,,,(guifanbiancheng)
- 2010-04-10 11:18:05下载
- 积分:1
-
shuzituxiangchuli
数字图像处理。MATLAB写的程序。免费下载。。。。。。。。。。。。。(Digital image processing. Programs written in MATLAB. Free Download. . . . . . . . . . . . .)
- 2010-06-26 21:51:20下载
- 积分:1
-
hmm-1.03
隐马尔科夫模型对文本信息进行抽取利用C++实现(Hidden Markov Model for text information extraction using C realize)
- 2007-10-22 16:32:22下载
- 积分:1
-
GM1_1.m
最原始的灰色预测,matlab程序,可直接使用(Most original gray forecast, matlab program, can be used directly)
- 2015-01-21 14:34:35下载
- 积分:1
-
vbandmatlab
使用MATLAB中的COM生成器(comtool),将M文件生成DLL,于VB中引用.从MATLAB6.5开始,MATLAB提供了COM生成器,使用该生成器,可以将MATLAB函数和自定义的函数打包成组件,然后集成到支持该技术的应用程序中去.使用该技术,可以很大程度上脱离MATLAB环境.
(The use of MATLAB)
- 2007-10-20 16:00:53下载
- 积分:1