文件名称:ACM
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:4kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在一个圆形操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2 堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。
例如,图1所示的4堆石,每堆石子数(从最上面的一堆数起,顺时针数)依次为4、5、9、4。则3次合并得分总和最小的方案为图2,得分总和最大的方案为图3。
编程任务:
对于给定n堆石子,编程计算合并成一堆的最小得分和最大得分。
-Playground in a circle around the stones are placed n heap. Stone is to have the order to merge into a pile. Provisions can only choose 2 adjacent stones piled into a heap of new and new pile of stones a few in mind for its combined score. Try to design an algorithm to calculate the n heap into a pile of stones the minimum scores and maximum scores. For example, shown in Figure 1 of 4 Rockfill, each pile a few stones (from the top of a pile of several cases, clockwise number) followed by 4,5,9,4. 3 times the combined score is the sum of the smallest program for the Figure 2, the sum of scores for the largest program of Figure 3. Programming tasks: for a given n stack stone, into a pile of programming the calculation of the minimum scores and maximum scores.
例如,图1所示的4堆石,每堆石子数(从最上面的一堆数起,顺时针数)依次为4、5、9、4。则3次合并得分总和最小的方案为图2,得分总和最大的方案为图3。
编程任务:
对于给定n堆石子,编程计算合并成一堆的最小得分和最大得分。
-Playground in a circle around the stones are placed n heap. Stone is to have the order to merge into a pile. Provisions can only choose 2 adjacent stones piled into a heap of new and new pile of stones a few in mind for its combined score. Try to design an algorithm to calculate the n heap into a pile of stones the minimum scores and maximum scores. For example, shown in Figure 1 of 4 Rockfill, each pile a few stones (from the top of a pile of several cases, clockwise number) followed by 4,5,9,4. 3 times the combined score is the sum of the smallest program for the Figure 2, the sum of scores for the largest program of Figure 3. Programming tasks: for a given n stack stone, into a pile of programming the calculation of the minimum scores and maximum scores.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
gui2石子.txt
gui.txt
和唱.txt
骑士问题题目.txt
骑士.txt
运动员.txt
gui.txt
和唱.txt
骑士问题题目.txt
骑士.txt
运动员.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.