编程介的小学生 2019-08-11 22:45 采纳率: 20.5%
浏览 235

分数的除法计算,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 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
    • ¥15 数据可视化Python
    • ¥15 要给毕业设计添加扫码登录的功能!!有偿
    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘