-
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
-
rounds-of-disaster
关于灾情巡视路线问题的数学模型,利用的是Floyd算法以及Hamilton圈改良算法(a modeling about rounds of disaster,taking advantage of the Floyd algorithm and improved Hamilton circle algorithm)
- 2011-12-28 20:20:20下载
- 积分:1
-
READ-CSV-FILES
读取csv文件 可以实现与matlab交互用,或与其他文件交互,程序较小但可用(read vsc files
Interacting with Matlab can be achieved using the Read CSV file, or interact with other documents, the program small but can be used)
- 2013-12-18 10:40:13下载
- 积分:1
-
GES_Demo_sor
古高科技公司的运动控制卡GE_400系列Demo例程(Ancient tech companies Motion Control Card GE_400 Series Demo routines)
- 2013-11-08 11:09:31下载
- 积分:1
-
White-Noise
对系统辨识中白噪声信号的加入影响的分析,并进行在线辨识。(Identification of the system by adding white noise analysis of the impact of
)
- 2011-07-09 22:15:47下载
- 积分:1
-
Monte-Carlo-simulatio
对一个使用相关器或匹配滤波器的二进制通信系统,用Monte Carlo仿真估计Pe,并画出Pe对SNR的图。(A correlator or matched filter using a binary communication system with Monte Carlo simulation estimates Pe, and Pe draw the map of the SNR.)
- 2011-10-04 10:44:48下载
- 积分:1
-
SNACCDLL
SNACC1.7 C++的动态库,可以做BER PER编码的库(SNACC1.7 C++ Of dynamic libraries, you can make BER PER encoding library)
- 2008-01-29 10:43:23下载
- 积分:1
-
Demo
i Controls 2.0 - Collection of drivers support Unicode
- 2015-04-14 05:49:56下载
- 积分:1
-
libc
libc 详细说明了C库里代码的实现过程,里边有详细的注释(detailed description of the C library libc code implementation process, detailed notes inside)
- 2010-03-10 09:32:48下载
- 积分:1
-
SJGC
matlab仿真,随机过程,泊松过程产生级仿真过程。(this is soft simulink and use matlab,so we can learn possion process and its how to produce.matlab is powerful soft for it.)
- 2011-12-13 20:38:18下载
- 积分:1