-
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
-
Desktop
电流型逆变器供电异步电动机传动系统的matlab仿真研究(Current type inverter fed induction motor drive system matlab simulation study)
- 2012-05-10 21:45:43下载
- 积分:1
-
SPICE
SPICE的代码,可以运行基于相关矩阵的估计方法,这个方法可以应用于稀疏求解,例如求解DOA(the matlab code for SPICE, it s a sparse covariance-based method for sparse solution, e.g.,the solution for the estimation of DOA)
- 2021-04-10 15:58:59下载
- 积分:1
-
dsplogofdm
OFDM basic code with cp,ifft and fft,hope it willbe benefical for you to understand the OFDM basics
- 2015-01-22 01:00:15下载
- 积分:1
-
1
说明: 关于matlab和delphi的接口的描述文档,建议学习此混合编程的人看看。(On matlab and delphi interface description document, the proposed study were to see this mix of programming.)
- 2010-08-26 13:52:08下载
- 积分:1
-
yuqunsuanfa-toolbox-for-matlab
鱼群算法的matlab工具箱,可在matlab中设定路径进行使用(yuqunsuanfa tool for matlab, fish swarm algorithm matlab toolbox)
- 2013-07-10 19:48:40下载
- 积分:1
-
matlab-program-design-course
这是<matlab程序设计教程>的书籍源代码。(this is the book code of matlab program design course)
- 2014-01-12 13:19:01下载
- 积分:1
-
photovoltaic-panel_matlab
photovoltaic solar panel model in maltab simulink We noted that the performances of a
generator photovoltaic are strongly influenced by the climatic
conditions, particularly the solar irradiation and the photovoltaic
temperature of the module.
- 2014-12-10 20:22:16下载
- 积分:1
-
wind-stat
此程序为统计风电出力差的概率密度,已有excel文件可以替换为自己数据。概率和为1(This procedure for wind power output difference of statistical probability density, existing excel file can be replaced with your own data. Probability is 1)
- 2015-01-08 15:36:50下载
- 积分:1
-
219
It is about matlab which depicts brain image segmentation
- 2013-11-21 20:45:34下载
- 积分:1