P20365 [CodeChef] ECPC10B
普及
题目描述

The activity of a panipuri seller is "making a panipuri and putting it on the palte of his customer".
$N$ customers are eating panipuri, Given an array $A$ of length $N$, $i^{th}$ customer takes $A_i$ seconds to eat a panipuri.
The Speed of Panipuri seller refers to the number of customers served per second. Determine the minimum speed of panipuri seller so that no customer has to wait for panipuri after getting his/her first panipuri.
Assume that the plate can hold infinite panipuris, and customer starts eating next panipuri just after finishing the current one. You would be provided with the time taken by each customer to eat a panipuri.
Panpuri seller serves panipuri in round robin manner (first to last and then again first).

-----Input:-----
- First line will contain $T$, number of testcases. Then the test cases follow.
- For each test case, the first line contains $N$ number of customers.
- Then the second line will contain $N$ space separated integers, $A_1$ to $A_N$, eating time taken by each customer(in seconds).

-----Output:-----
- For each test case, print a single line containing the minimum integral speed of panipuri seller so that no customer has to wait.

-----Constraints-----
- $0 < T \leq 100$
- $0 < N \leq 10^6$
- $0 < A_i \leq 10^9$
- Sum of $N$ over all test cases does not exceed $10^6$

-----Sample Input:-----
2
4
2 4 6 3
5
2 3 4 6 5

-----Sample Output:-----
2

3

-----EXPLANATION:-----
$Test case$ $1$:

Let's assume speed of panipuri seller be 1.

So starting from $0^{th}$ second, in $0$ to $1$ second seller make a panipuri and put it into the plate of first customer, and first customer completely eat it in $1$ to $3$ second as he takes $2$ second to eat a panipuri. But in $3$ to $4$ second panipuri seller is serving to $4^{th}$ customer, and hence first customer have to wait, so 1 cannot be our answer.

Next possible speed can be $2$ .

Starting from $0^{th}$ second, at half second seller make a panipuri and put it into the plate of first customer, first customer completely eat it on $2.5$ second as he takes $2$ second to eat a panipuri. In $0.5$ to $1$ second, seller serve the second customer. similarly in $1$ to $2$ second $3^{rd}$ and $4^{th}$ customer will be serve, in $2$ to $2.5$ second, seller will again serve the first customer so at $2.5$ sec $1^{st}$ customer will have a panipuri to eat.

Similarly proceeding further we will find that no customer have to wait when speed is $2$.

输入格式

见题面

输出格式

见题面

样例输入
['2', '4', '2 4 6 3', '5', '2 3 4 6 5']
样例输出
['2', '3']