-
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
-
matcom
在VC++6.0中利用MATCOM接口调用MATLAB中的.mat文件进行数据处理(In VC++6.0 using MATCOM interface calls the MATLAB. Mat file for data processing)
- 2013-11-07 21:31:45下载
- 积分:1
-
aa
说明: 要求如下: 数组与函数 1. 实验目的:掌握数组与函数的使用方法,掌握,面向过程的程序设计方法,复习分支与循环语句的使用。...
(Requirements are as follows: the array with the function 1. Experimental purposes: taking control of the array with the function to use, master, process-oriented program design method, review the use of branching and loop statements. ...)
- 2010-03-20 15:02:12下载
- 积分:1
-
cpio-2.11.tar
cpio源码,cpio2-11,不要钱了,随便看看(cpio code)
- 2014-02-20 20:38:40下载
- 积分:1
-
OFDM
清华大学OFDM原理性讲座,比较基础。对初学者也许有点用处(Tsinghua University, OFDM principle of lectures basis of comparison. May be of some use for beginners)
- 2010-09-02 10:34:12下载
- 积分:1
-
MathematicalFns
Some mathematical functions
- 2009-03-16 21:16:03下载
- 积分:1
-
Controlling_console_applications_demo
通过程序控制CMD程序的输出,并对其进行解析和过滤(CMD program through the control output, and its analysis and filtering)
- 2007-11-22 00:18:40下载
- 积分:1
-
ucgui3.2-vc6.0
基于嵌入式GUI的设计源码,在windows上开发(based on vc6.0, the GUI of embeded OS)
- 2014-02-14 16:02:08下载
- 积分:1
-
Acceleration-of-displacement
在振动台试验后由测得的加速度值两次积分求位移(Acceleration of displacement)
- 2014-10-23 10:46:27下载
- 积分:1
-
texture_code_and_thesis
4个收集的vc,matlab纹理检测,纹理分割代码和数篇IEEE纹理分割,纹理缺陷检测论文(Number of Posts IEEE texture segmentation, texture defect detection papers and four personal collection vc, matlab code texture segmentation)
- 2010-07-01 16:20:53下载
- 积分:1