文件名称:hebing
介绍说明--下载内容均来自于网络,请自行研究使用
石子合并问题
问题描述:
在一个圆形操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2 堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。
编程任务:
对于给定n堆石子,编程计算合并成一堆的最小得分和最大得分。
数据输入:
第1 行是正整数n,1<=n<=100,表示有n堆石子。
第二行有n个数,分别表示每堆石子的个数。
结果输出:
第1 行中的数是最小得分;第2 行中的数是最大得分。
输入
6
3 4 5 6 7 8 9
输出
84
125-Stones merger
Problem descr iption:
Around in a circular playground placed n heap stones. Stones are to be combined into a pile orderly. Can only be selected for each and every adjacent two reactor combined into a new pile of stones, and the new pile of stones and recorded the score for the merger. Try to design an algorithm to calculate the n combined into a pile of gravel heap minimum score and maximum score.
Programming tasks:
Heap for a given n stones, programming combined into a pile of calculating the minimum score and maximum score.
Data entry:
Line 1 is a positive integer n, 1 <= n <= 100, that there n stone heap.
There are n number of second line, respectively the number of stones per heap.
The resulting output:
Line 1 is the minimum score in a few No. 2 line number is the maximum score.
Enter
6
3456789
Export
84
125
问题描述:
在一个圆形操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2 堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。
编程任务:
对于给定n堆石子,编程计算合并成一堆的最小得分和最大得分。
数据输入:
第1 行是正整数n,1<=n<=100,表示有n堆石子。
第二行有n个数,分别表示每堆石子的个数。
结果输出:
第1 行中的数是最小得分;第2 行中的数是最大得分。
输入
6
3 4 5 6 7 8 9
输出
84
125-Stones merger
Problem descr iption:
Around in a circular playground placed n heap stones. Stones are to be combined into a pile orderly. Can only be selected for each and every adjacent two reactor combined into a new pile of stones, and the new pile of stones and recorded the score for the merger. Try to design an algorithm to calculate the n combined into a pile of gravel heap minimum score and maximum score.
Programming tasks:
Heap for a given n stones, programming combined into a pile of calculating the minimum score and maximum score.
Data entry:
Line 1 is a positive integer n, 1 <= n <= 100, that there n stone heap.
There are n number of second line, respectively the number of stones per heap.
The resulting output:
Line 1 is the minimum score in a few No. 2 line number is the maximum score.
Enter
6
3456789
Export
84
125
(系统自动生成,下载前可以参看下载内容)
下载文件列表
124125.cpp