-
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
-
chapter19
matlab软件中有关elman神经网络预测的程序(matlab software procedures elman neural network prediction)
- 2013-12-10 09:42:57下载
- 积分:1
-
Raptor
数字喷泉码的仿真,使用C++语言所进行的仿真。(Simulation of digital fountain code, using C++ language for the simulation.)
- 2011-11-24 13:09:59下载
- 积分:1
-
sgl_lib
VC与matlab混合编程方面的书籍,介绍全面,适用,是一本不错的书(英文)(VC and matlab mixing programming books, introduced comprehensively, applicable, is a good book (English))
- 2010-09-11 13:34:32下载
- 积分:1
-
MATLAB-and-VCPP
一种matlab与VC++混合编程的方法。供初学者参考学习。可以与MATLAB通讯。(One kind of matlab and VC++ mixed programming method. Reference for beginners to learn. You can communicate with MATLAB.)
- 2011-11-02 11:24:14下载
- 积分:1
-
ctwmcmcbridge
file dll very important to run the file spike under matlab code.
- 2010-12-14 14:55:55下载
- 积分:1
-
matlab-toolbox
Matlab 工具,各类积分,二次定积分,gquad2dggen等(Matlab tool, all kinds of points, the second definite integral, gquad2dggen etc.)
- 2013-08-25 21:22:26下载
- 积分:1
-
farsight070825DSP
了一些资料,都没有说这个仿真平台是什么,是matlab还是直接在VC++的编译环境编程?还是有专门的仿真环境呢?
3、如果用实物验证的话,我觉得有两种方式:一是用摄像头来采集整个地图信息,智能车的位置也有摄像头来反馈;二是,整个地图保存在内存中,小车根据传感器信息自我定位,然后和保存的地图比较。(You can download the current points to 1, the source download get points one day, you can download up to 20 times. [View your upload log] [continue to upload source to increase points] You have recently downloaded the 240 source code, you should contribute something new other friends 【Source】 it? Joined the group】 【QQ, blowing boasting a chat. You can also create a QQ group you join the union,)
- 2010-08-08 11:44:31下载
- 积分:1
-
MFC-WINDOWSTASKMANAGER-JOY
基于windows的任务管理器开发设计 windows task mananger(Based on the windows task manager development and design windows task mananger)
- 2014-02-07 16:52:34下载
- 积分:1
-
Grey-Model(2)
灰色模型GM(1,1)的matlab代码(Gray model)
- 2011-11-09 09:26:12下载
- 积分:1