-
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
-
MATLABandCCS
说明: 这是这段时间 在网上荡的 MATLAB 与CCS联调的资料。里面包含的联调的命令,以及一个完整的FIR 程序,利用MATLAB与CCS的联合实现!希望对大家有用。。。(This is a time-line swing of MATLAB and CCS FBI data. Which included the FBI' s command, as well as a complete FIR program using MATLAB and CCS, the joint realization of! Want to be useful to everyone. . .)
- 2010-03-25 15:58:28下载
- 积分:1
-
vc_matcom_dll
VC和MATLAB的混合编程技术之一,matcom生成dll,vc成功调用的例子(One of a combination of VC and MATLAB programming technology, matcom generate DLL, VC example of a successful call
)
- 2013-09-18 14:29:03下载
- 积分:1
-
tichuxinghaobaoluo
信号包络,提出信号包络,便于观察信号波动过程,非常有用(Signal envelope, put forward the signal envelope, easy to observe the process of signal fluctuations, very useful)
- 2014-02-25 09:46:33下载
- 积分:1
-
ProgramAnalyze
一个可以用来分析程序复杂度的程序,可以评价程序的复杂度(A program can be used to analyze the complexity of the process, the complexity of procedures can be evaluated)
- 2010-03-07 21:52:46下载
- 积分:1
-
blackholeaodv.cc.tar
FILE SHOWS THE MODIFICATIONS FOR AODV.CC FOR INTRODUCING BLACKHOLE ATTACKS
- 2014-01-31 13:41:53下载
- 积分:1
-
Tbbaaluojbh
这是在matlab下实现的包络检波算法法。先对信号进行调制,然后进行包络检波。
(This is the method of envelope detection algorithm under Matlab. First signal modulation, and then proceed to the envelope detector.)
- 2012-08-18 07:25:29下载
- 积分:1
-
3_6-Ackerman
Ackeman函数的递归方法,运用简洁的递归思想实验复杂数学表达式的计算(Ackeman function recursive method, the use of simple recursive thought experiment to calculate complex mathematical expressions)
- 2015-03-30 16:32:20下载
- 积分:1
-
EKF_UKF
EKF UKF 滤波算法在MATLAB仿真软件中的仿真,并进行对比(EKF UKF filtering algorithm in MATLAB software simulation, and compared)
- 2013-03-08 22:10:57下载
- 积分:1
-
Exercise05
5th exercise of computer graphics course
- 2014-11-22 23:55:14下载
- 积分:1