编程介的小学生 2019-05-04 08:56 采纳率: 20.5%
浏览 165

这里倍数和除数的一个算法的问题,怎么采用C语言的程序的编写的思路实现的呢?

Problem Description
Yifenfei and lemon are good friends, they don’t like Ctw, because Ctw’s name is so worldliness.
One day Lcy give them a lot of jewel. Each jewel has own value. They put the jewels in a line, and don’t swap the position of jewel. In order to division the jewels, they think a lot of ideas. At last, they decide a way to division by voting. First let Ctw to divide the line into two non-empty sublines (each subline express a group of jewel). Second yifenfei will to divide one of sublines and also divide it into two non-empty sublines. Than let lemon to choose one of this three sublines., than yifenfei choose one of remaining subline. At last Ctw hold the last subline..
Every one wants to maximize their own share. But because yifenfei don’t like Ctw, so if there are two divisions let himself get the some value, he will choose the way let Ctw get smaller values.
Assuming every one have full knowledge of each other’s strategies and make their decision optimally.

Input
The input contains multiple test cases.
Each test case include, first one integers n. (3<=n<=100), express how many jewels.
Next one line include n integers Vi (Vi<2^31). The order of jewel is according the position in the line..

Output
For each test case output one integer that CTW is maximum value of jewels can get.

Sample Input
4
50 90 10 100
3
5 5 5
9
1 1 1 1 1 1 1 1 1

Sample Output
50
5
2

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 本题的答案是不是有问题
    • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
    • ¥15 C++使用Gunplot
    • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
    • ¥15 matlab数字图像处理频率域滤波
    • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
    • ¥15 ELGamal和paillier计算效率谁快?
    • ¥15 蓝桥杯单片机第十三届第一场,整点继电器吸合,5s后断开出现了问题
    • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
    • ¥15 Arcgis相交分析无法绘制一个或多个图形