文件名称:stone
介绍说明--下载内容均来自于网络,请自行研究使用
在一个圆形操场的四周摆放N堆石子(N≤100),现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。编一程序,读入堆数N及每堆石子数(≤100)选择一种合并石子的方案,分别得到合并这N堆石子为一堆,可以得到的最大得分和最小得分
输入包含多个例子。第一行为N,即石子堆的数目,以下一行为N个整形,分别代表每堆石子的数目。当N=0时,输入结束。
-Around the playground in a circular heap stones placed N (N ≤ 100), are to merge into a gravel pile orderly. Requirements can only choose two piles adjacent into a new pile, the pile of stones and the new number, record the score for the merger. Compile a program that reads the stack number N and the number of each pile stones (≤ 100) to choose a merger proposal stones, were obtained for the merger of the N stack a pile of stones, you can get the maximum score and minimum score
Enter multiple examples. The first act N, the number of stone heap following a plastic behavior of N, representing the number of stones for each heap. When N = 0, the input end.
输入包含多个例子。第一行为N,即石子堆的数目,以下一行为N个整形,分别代表每堆石子的数目。当N=0时,输入结束。
-Around the playground in a circular heap stones placed N (N ≤ 100), are to merge into a gravel pile orderly. Requirements can only choose two piles adjacent into a new pile, the pile of stones and the new number, record the score for the merger. Compile a program that reads the stack number N and the number of each pile stones (≤ 100) to choose a merger proposal stones, were obtained for the merger of the N stack a pile of stones, you can get the maximum score and minimum score
Enter multiple examples. The first act N, the number of stone heap following a plastic behavior of N, representing the number of stones for each heap. When N = 0, the input end.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
stone.cpp