-
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
-
complex
Math class complex calculations. There main argument, the complex conjugate calculation. . .
- 2014-01-20 18:28:56下载
- 积分:1
-
OpenCV_2_Computer_Vision_Application_Programming_
open cv 2 computer vision
emgu
- 2015-02-10 03:17:37下载
- 积分:1
-
Bwiddebandtarr
宽带信号测向的几种直接处理算法法,主要用于宽带目标的DOA估计
(Broadband signal measurements to several processing algorithms law, mainly for broadband target DOA estimation)
- 2020-11-12 16:39:44下载
- 积分:1
-
matlab-handbook
本书对于MATLAB7给予实践性指导(Book to give practical guidance for MATLAB7)
- 2011-06-19 21:41:03下载
- 积分:1
-
矢量编程潮流及最优潮流数据文件
IEEE4,14,30,57,118,300总线matlab代码(IEEE4,14,30,57118300 bus matlab code)
- 2020-12-20 08:49:09下载
- 积分:1
-
CrcStream
CrcStream stream checksum calculator
- 2007-10-23 11:38:30下载
- 积分:1
-
smth
MATLAB SIMULINK 改进型SIMITH预估控制器(MATLAB SIMULINK improved SIMITH forecast controller)
- 2014-01-17 10:25:50下载
- 积分:1
-
123
很好很牛 速度下载大家不要再犹豫了
经典的windwos ce教程(Download speed is very good cattle)
- 2009-12-21 21:44:06下载
- 积分:1
-
3cib
计算机图形图像设计课程理论,关于三次有理b样条曲线matlab实现,程序代码。(Computer graphics graphic design curriculum theory, on the three rational b-spline curve matlab realize, program code.)
- 2008-05-29 15:45:24下载
- 积分:1