-
程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带...
程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程序。 编程任务: 对于给定的n个程序存放在磁带上的长度,编程计算磁带上最多可以存储的程序数。 数据输入:由文件input.txt给出输入数据。第一行是正整数n,表示文件个数。接下来的1 行中,有n 个正整数,表示程序存放在磁带上的长度。 结果输出: input.txt output.txt 6 50 5 2 3 13 8 80 20 -program storage problem : There n procedures (1,2, ..., n) to be stored in the length of the L tape. I kept in the proceedings on the tape length is Li, 1 i n storage procedures to seek to establish that n procedures on tape storage of a program that allows the tape to store as much as possible the procedure. Programming tasks : to the n procedures stored in the tape length, calculated programming on tape can store up to the number of procedures. Data input : from the document input.txt given input data. The first line is a positive integer n, said the document number. Following a visit, n is an integer, said procedures stored on tape length. Results output : input.txt output.txt 6 50 5 2 3 13 8 80 20
- 2023-01-10 04:30:04下载
- 积分:1
-
动态规划的石子问题算法下载压缩包后,解压,使用vc
动态规划的石子问题算法下载压缩包后,解压,使用vc-stones dynamic programming problem packet compression algorithm download, extract, use vc
- 2022-07-18 16:07:24下载
- 积分:1
-
哈夫曼树算法
根据给定的n个权值{w1,w2,……wn},构造n棵只有根结点的二叉树,令起权值为wj
在森林中选取两棵根结点权值最小的树作左右子树,构造...
哈夫曼树算法
根据给定的n个权值{w1,w2,……wn},构造n棵只有根结点的二叉树,令起权值为wj
在森林中选取两棵根结点权值最小的树作左右子树,构造一棵新的二叉树,置新二叉树根结点权值为其左右子树根结点权值之和
在森林中删除这两棵树,同时将新得到的二叉树加入森林中
重复上述两步,直到只含一棵树为止,这棵树即哈夫曼树
-Huffman tree algorithm based on a given n-weights (w1, w2, ... ... wn), construct n trees only a root node of the tree, so that from the right value of wj in the forest root node to select two the right tree for the value of the smallest subtree around, a new binary tree structure, the right to buy a new tree root node value of its subtree root node around the right value in the forest and delete these two trees, At the same time, the new binary tree obtained by adding the forest to repeat the above two steps until a tree containing only the date, that is, Huffman tree tree
- 2023-05-05 13:05:03下载
- 积分:1
-
算法设计与分析 蚁群算法的设计和分析,具体的代码和细致的讲解...
算法设计与分析 蚁群算法的设计和分析,具体的代码和细致的讲解-Algorithm design and analysis of ant colony algorithm design and analysis, the specific code and detailed explanation
- 2022-03-23 06:59:58下载
- 积分:1
-
学校超市选址分析
学校超市选址问题(带权有向图的中心点)
- 2022-04-18 22:53:13下载
- 积分:1
-
PB polymorphic Application
PB中多态的应用-PB polymorphic Application
- 2023-01-03 06:25:04下载
- 积分:1
-
这是一个旅行商问题的算法源程序,代码较为简短,说明详细,可读性好。压缩包里面只包含源程序文件,要在vc上面运行。...
这是一个旅行商问题的算法源程序,代码较为简短,说明详细,可读性好。压缩包里面只包含源程序文件,要在vc上面运行。-This is a traveling salesman problem algorithm source code, code brief that detailed and readable. Compressed they contain only source files to run above the vc.
- 2022-03-20 12:32:44下载
- 积分:1
-
根据贪心算法,来求解最小生成树;
这种情况,可能求不不全局最优解,但是,可以求出当前情况下的最优解;...
根据贪心算法,来求解最小生成树;
这种情况,可能求不不全局最优解,但是,可以求出当前情况下的最优解;-According to greedy algorithm to solve the minimum spanning tree this situation, it may not seek the global optimal solution is not, however, you can find the optimal solution under the current situation
- 2023-05-29 18:05:03下载
- 积分:1
-
OSDemoView warehouse management system FOSS
OSDemoView仓库管理系统源码-OSDemoView warehouse management system FOSS
- 2022-04-18 22:58:20下载
- 积分:1
-
SQL Server与Access、Excel的数据转换
SQL Server与Access、Excel的数据转换-SQL Server and Access, Excel data conversion
- 2023-02-13 07:40:03下载
- 积分:1