文件名称:04
介绍说明--下载内容均来自于网络,请自行研究使用
圆形操场的四周摆放着n堆石子,现在要将石子有次序地合并成一堆,规定每次只能将相邻的两堆合并成新的一堆,并将新的一堆石子数计为该次合并的得分。编写程序求出将n堆石子合并成一堆的最小得分和最大得分。
输入:第一行一个整数,表示石子堆数,第二行n个数,表示每堆石子的个数。
输出:第一行中的数是最小得分,第二行中的数是最大得分
-Placed around a circular playground with n stack stone, stone is now to have the order to merge into a pile, can only be provided for each adjacent两堆into a pile of new, and a pile of stones a few new terms for its combined score. Programming to derive the n heap into a pile of stones the minimum and maximum points scored. Input: the first line an integer that the number of stones piled, n the number of the second line, said the number of stones in each pile. Output: the first line is the smallest number of points, the second line is the largest of several scoring
输入:第一行一个整数,表示石子堆数,第二行n个数,表示每堆石子的个数。
输出:第一行中的数是最小得分,第二行中的数是最大得分
-Placed around a circular playground with n stack stone, stone is now to have the order to merge into a pile, can only be provided for each adjacent两堆into a pile of new, and a pile of stones a few new terms for its combined score. Programming to derive the n heap into a pile of stones the minimum and maximum points scored. Input: the first line an integer that the number of stones piled, n the number of the second line, said the number of stones in each pile. Output: the first line is the smallest number of points, the second line is the largest of several scoring
(系统自动生成,下载前可以参看下载内容)
下载文件列表
石子合并问题.cpp