-
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
-
DOA_esprit
谱估计源程序:是谱估计中的经典算法esprit,MUSIC等算法的源程序(spectrum estimation source : the estimation of the classical algorithm esprit, the MUSIC algorithm source code)
- 2007-03-09 10:46:26下载
- 积分:1
-
relavation
有关 自相关积分的研究和讲解很实用有关 自相关积分的研究和讲解很实用(Related to the integration of research and autocorrelation explain very practical study on the autocorrelation integrals and explain very practical)
- 2014-11-18 21:21:28下载
- 积分:1
-
fembem
基于边界元与有限元耦合的地震动模拟程序。能简单有效的解决地震作用下地表位移反应问题(Based on boundary element and finite element coupled to ground motion simulation program. Can be simple and effective solution surface displacement response under earthquake problem)
- 2020-12-11 15:29:18下载
- 积分:1
-
trackini
基于纯角度信息的采用逻辑规则和简单方法的航迹起始仿真程序()
- 2021-04-14 22:38:55下载
- 积分:1
-
Patton_copula_toolbox_4jun06
大名鼎鼎的Patton的copula工具箱,不知道各位有没有(The famous Patton of the copula toolbox, do not know if you have any)
- 2009-10-28 08:16:25下载
- 积分:1
-
Imagewatermarking
i write code for image watermarking in matlab
- 2009-11-05 02:49:17下载
- 积分:1
-
renallaniramyatestmail
IEEE paper on ofdm genration
- 2011-02-15 07:37:55下载
- 积分:1
-
suanfa
说明: 这是用matlab编的burg算法和lenvinson算法,用来估计信号的功率谱。(This is a series of burg with matlab algorithms and lenvinson algorithm used to estimate the signal power spectrum.)
- 2008-12-03 12:56:09下载
- 积分:1
-
codetsu
说明: 用来对图像进行分类。Source code for Towards Total Scene Understanding: Classification, Annotation and Segmentation in an Automatic Framework. Computer Vision and Pattern Recognition (CVPR) 2009,Li-Jia Li, Richard Socher and Li Fei-Fei. (Source code for Towards Total Scene Understanding: Classification, Annotation and Segmentation in an Automatic Framework. Computer Vision and Pattern Recognition (CVPR) 2009,Li-Jia Li, Richard Socher and Li Fei-Fei. )
- 2010-05-04 17:16:03下载
- 积分:1