文件名称:Stones-merger
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:10.11kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在一个圆形操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2 堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。
试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。
【输入文件】
包含两行,第1 行是正整数n(1<=n<=100),表示有n堆石子。
第2行有n个数,分别表示每堆石子的个数。 -Around in a circular playground placed n heap stones. Stones are to be combined into an orderly pile. Provisions can only choose two adjacent pile into a new pile of stones, a pile of stones and a few new record score for the merger. Try to design an algorithm to calculate the n heap into a pile of stones combined minimum score and maximum score. [Input file] contains two lines, line 1 is a positive integer n (1 < = n < = 100), that has n heap stones. Line 2 n numbers, respectively, the number of stones for each heap.
试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。
【输入文件】
包含两行,第1 行是正整数n(1<=n<=100),表示有n堆石子。
第2行有n个数,分别表示每堆石子的个数。 -Around in a circular playground placed n heap stones. Stones are to be combined into an orderly pile. Provisions can only choose two adjacent pile into a new pile of stones, a pile of stones and a few new record score for the merger. Try to design an algorithm to calculate the n heap into a pile of stones combined minimum score and maximum score. [Input file] contains two lines, line 1 is a positive integer n (1 < = n < = 100), that has n heap stones. Line 2 n numbers, respectively, the number of stones for each heap.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Stones merger.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.