-
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
-
dsss01
直接序列扩频通信系统仿真程序,使用matlab语言设计的程序。(direct sequence spread spectrum communication system simulation, the use of Matlab language design process.)
- 2021-04-29 12:28:43下载
- 积分:1
-
sysrecognition
最小二乘法系统辨识,包括系统阶次的辨识等,希望大家喜欢(Least squares system identification, including the identification of system order and so on, hope you like)
- 2010-05-27 15:21:11下载
- 积分:1
-
mimo-transmission
模拟信号在多天线下传输的整个过程,包括调制、过信道、解调、计算误码率等(The analog signal in a multiple antenna transmission the entire process, including modulation, over a channel demodulation, calculate the error rate)
- 2013-10-29 10:50:42下载
- 积分:1
-
AR-Matlab
ar模型的功率谱估计 在Matlab环境下的方法展示,供大家参考和使用。(The ar model power spectrum estimation method in Matlab environment show for your reference and use.)
- 2013-04-09 22:14:35下载
- 积分:1
-
CHAZHI
这是计算机插直的matlab算法集锦,全面而有用,对从事数值计算方面的朋友很有帮助!(This is a computer algorithm matlab interpolation straight allehanda, comprehensive and useful aspects of numerical computation involved in helpful friend!)
- 2007-08-24 16:48:59下载
- 积分:1
-
xiaoqiuxialo
这是一个用MATLAB编的模拟一个小球的下落过程 ,很不错,希望和大家分享.(This is an addendum to the MATLAB simulation of a small ball on the whereabouts of course, very good, and he hopes to share with you.)
- 2007-05-05 11:08:52下载
- 积分:1
-
gui
运用matlab软件,进行回归运算,方便快捷(Use matlab software, regression calculation, convenient)
- 2013-09-14 10:17:53下载
- 积分:1
-
feixianxing_zixitong
桥式起重机模型分析,非线性模型的仿真原理图(Bridge crane model analysis, nonlinear models schematic simulation)
- 2012-01-08 22:36:02下载
- 积分:1
-
ch2
MATLAB语言与控制系统仿真ch2本书基于MATLAB 5.2版,提供了使用MATLAB的实践性指导。MATLAB已成为适合多学科、多种工作平台的功能强大、界面友好、语言自然并且开放性强的大型优秀应用软件,同时也已成为国内外高等院校高等数学、数值分析、数字信号处理、自动控制理论以及工程应用等课程的基本教学工具。本书按逻辑编排,自始至终用实例描述;内容完整且每章相对独立;是一本简明的MATLAB参考书,既适用于初学者,也适用于高级MATLAB用户。对MATLAB与FORTRAN、C等语言结合的描述更是所有MATLAB书籍中少有的一大特色。 本书适合作为理工科高等院校研究生、本科生教学用书,也可作为广大科研工程技术人员的自学用书。(MATLAB language and Control System Simulation ch2 book based on MATLAB 5.2 version, to provide practical guidance for using MATLAB. MATLAB has become a suitable the multidisciplinary working platform powerful, user-friendly, natural language open large outstanding application software, as well as domestic and foreign institutions of higher learning higher mathematics, numerical analysis, digital signal processing, automatic basic teaching tools of control theory and engineering applications courses. The book is organized in a logical, throughout the examples described complete and relatively independent of each chapter is a concise MATLAB reference books, both for beginners and for advanced MATLAB users. Combined with the description of MATLAB and FORTRAN, C, and other languages is a rare feature in the books of all MATLAB. This book is suitable as a science and engineering universities graduate, undergraduate teaching books, the majority of scientific engineering and)
- 2012-11-19 11:07:46下载
- 积分:1