-
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
-
VBaMatlabexchenge-data
VB与matlab混合编程,实现VB与matLAB数据传递,完成相关编程(VB and matlab mixed programming, data transfer between VB and matLAB, complete the relevant programming)
- 2013-10-29 10:10:58下载
- 积分:1
-
Matlab-symbolic-toolkit-introduction
matlab 工具箱介绍_各函数及算法介绍(matlab toolbox functions and algorithms described _ Introduction of)
- 2011-12-01 18:17:57下载
- 积分:1
-
FANYI
关于恶意代码检测和LTE网络,4G的LTE-A网络的外语文章的翻译论文(Foreign-language article about malicious code detection and lte network, lte-a network of 4g)
- 2014-01-02 18:09:59下载
- 积分:1
-
PCA
在WINDOWS环境下,使用MATLAB写的PCA代码,移植性好,对于做PCA的能方便使用!(In the WINDOWS environment, the use of PCA written in MATLAB code, portability, and for doing the PCA can easily use!)
- 2013-09-14 17:13:24下载
- 积分:1
-
viterbi-matlab
卷积编码器g1=111,g2=101
x为输入的待译码序列
x=[1,0,1,0,0,1,0,0,0,1,0,1,1,1]
x=[1,1,0,1,0,1,1,0,0,1]
x=[1,1,1,0,0,0,1,0,1,1]
a=size(x) 输入序列的长度
s=a(2)/2 译码后的m序列长度为x的一半
m=zeros(1,s) 最终结果存放
ma=zeros(1,s+1) 存放Fa路径的
mb=zeros(1,s+1) 存放Fb路径的
mc=zeros(1,s+1) 存放Fc路径的
md=zeros(1,s+1) 存放Fd路径的(viterbi decoder)
- 2015-04-20 17:06:18下载
- 积分:1
-
c
说明: c自理阿婆;了解了解顾客了 快乐 噶爱国 (c self grandmother learn about customer happiness Karma patriotic)
- 2010-04-04 16:47:04下载
- 积分:1
-
dimension
维娜滤波器的设计matlab代码以及仿真(The design of Sabina filter dimension
)
- 2011-05-26 11:58:06下载
- 积分:1
-
matlab4finalfinal
是基于STBC的MIMO-OFDM的MATLAB仿真,生成误码率曲线(MATLAB simulation is based on the STBC MIMO-OFDM generate BER curves)
- 2020-07-03 05:00:02下载
- 积分:1
-
Lab13_MultArrays
Lab13_MultArrays 多维数组的使用,实现数组定位(Use Lab13_MultArrays multidimensional arrays, array positioned to achieve)
- 2014-01-06 09:13:28下载
- 积分:1