文件名称:222
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:10.65kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在一个园形操场的四周摆放N堆石子(N≤100),现要将石子有次序地合并成一堆。规定
每次只能选相邻的两堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。
编一程序,由文件读入堆数N及每堆的石子数(≤20),
①选择一种合并石子的方案,使得做N-1次合并,得分的总和最小;
②选择一种合并石子的方案,使得做N-1次合并,得分的总和最大。
-Playground in a park-shaped stone piles around the place N (N ≤ 100), is to have the order to merge into a gravel pile. Provided you can only choose two piles adjacent to merge into a new pile, and the number of new pile of stones, recorded the score for the merger. Compiling a program file into the heap by the number of N and every pile of stones, the number (≤ 20), ① stones to choose a merger proposal, made to do N-1 merger, the sum of the minimum score ② select a merger stones The program allows to do N-1 merger, the largest sum of scores.
每次只能选相邻的两堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。
编一程序,由文件读入堆数N及每堆的石子数(≤20),
①选择一种合并石子的方案,使得做N-1次合并,得分的总和最小;
②选择一种合并石子的方案,使得做N-1次合并,得分的总和最大。
-Playground in a park-shaped stone piles around the place N (N ≤ 100), is to have the order to merge into a gravel pile. Provided you can only choose two piles adjacent to merge into a new pile, and the number of new pile of stones, recorded the score for the merger. Compiling a program file into the heap by the number of N and every pile of stones, the number (≤ 20), ① stones to choose a merger proposal, made to do N-1 merger, the sum of the minimum score ② select a merger stones The program allows to do N-1 merger, the largest sum of scores.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
石子合并(动态规划)详细解题报告.doc
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
