Everlasting Gold
题号:NC210143
时间限制:C/C++/Rust/Pascal 5秒,其他语言10秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

有一群海盗获得了一箱宝藏,是一箱金币,有枚,假设这些金币都是一样的。
海盗一共有个,编号
这群海盗准备分了这箱金币。
于是他们决定从大号到小号,即从号到号,按顺序进行提议,每个海盗可以提议一种分金方式(分金时金币不可切割,也就是说必须是以一枚为单位),如果有大于等于一半的人同意,那么就可以以这种方式分金币;否则就会被扔到海里喂鲨鱼(嗝屁)。
我们假设这些海盗都绝顶聪明,也就是说他们总是能做出最理性的分析。
那么当你是海盗且你来提议分金时,你可以活下来吗,如果可以活下来你可以获得多少金币?

输入描述:

First line gives a integer , represent the number of inputs.()
Next  lines, each line gives a integer , as the statement says.
The input guarantees that .

输出描述:

The output should have  lines.
Each line has a integer, represent the number of gold coins you can get.
If you cannot survive, print .
示例1

输入

复制
2
1
2

输出

复制
1000
1000