6125 - 例9.18 合并石子
时间限制 : 1 秒
内存限制 : 128 MB

输入

输出

样例
输入
7 13 7 8 16 21 4 18
输出
239
来源
一本通