-
0-1背包问题
给定N中物品和一个背包。物品i的重量是Wi,其价值位Vi ,背包的容量为C。问应该如何选择装入背包的物品,使得转入背包的物品的总价值为最大。
在选择物品的时候,对每种物品i只有两种选择,即装入背包或不装入背包。不能讲物品i装入多次,也不能只装入物品的一部分。因此,该问题被称为0-1背包问题。该算法中,矩阵c的大小为(m+1)×(n+1),物体的重量、价值和解向量大小都等于物体个数n,故该算法的空间复杂度为O(nm)。对物体重量、价值的初始化(算法实现略)所需时间都为n,解向量和矩阵第0行初始化时间为n,矩阵第0列初始化时间为m,对矩阵c的计算所需时间为n×m,解向量X的确定时间为n,故整个算法的时间复杂度为O(nm)。
- 2022-01-25 23:07:45下载
- 积分:1
-
简单的计算器功能实现,用了多态,继承等特性,是学习的好例子。...
简单的计算器功能实现,用了多态,继承等特性,是学习的好例子。-Realize a simple calculator function with a multi-state, inheritance, etc., is a good example of learning.
- 2022-05-15 05:05:54下载
- 积分:1
-
该程序实现了一个通信电话簿管理系统。铜…
该程序实现了一个通讯电话簿管理系统。是课程设计必备资料。通过他可以很好的了解简单的管理系统如何实现。-The program implements a communication Telephone Directory management system. Curriculum design information is required. He could very well through a simple understanding of how to achieve the management system.
- 2022-01-26 03:49:24下载
- 积分:1
-
这是一个简单的用C语言编译的汉诺塔程序,该程序是在VC环境下编译出来的。...
这是一个简单的用C语言编译的汉诺塔程序,该程序是在VC环境下编译出来的。-This is a simple C language compiler to use the Tower of Hanoi program was compiled under VC out.
- 2022-07-23 00:45:34下载
- 积分:1
-
seven VC source code can be proficient in the basic phrases C
7个VC++的源代码,可以精通C++的基本语句-seven VC source code can be proficient in the basic phrases C
- 2022-03-18 23:15:07下载
- 积分:1
-
obscured in the process WIN2000
在win2000下隐藏进程-obscured in the process WIN2000
- 2023-01-20 16:50:04下载
- 积分:1
-
win NT . 2k . XP 下键盘屏蔽,包括win键
win NT . 2k . XP 下键盘屏蔽,包括win键-keyBoard-lock(win) as win-nt,2k and xp
- 2023-09-04 21:30:03下载
- 积分:1
-
Student Information Management Information Management students
学生信息管理 学生信 息管理 -Student Information Management Information Management students
- 2022-05-27 08:58:31下载
- 积分:1
-
这是登陆小程序的时候,用户登陆的主要功能,…
这是linux登陆时候的一小程序,主要功能实现了用户登陆时,只能执行我们定义的一些命令.其他对用户不可见.-This is the time of landing a small program, the main function of user landing, they can only enforce our definition of order. Other users can see.
- 2022-07-25 18:31:24下载
- 积分:1
-
Sopa de letras
拉曼多文本建筑方案帕拉布拉斯.txt是的,我是索帕·德·莱特拉斯。
- 2022-08-04 04:23:20下载
- 积分:1