#c22502. 二分答案
二分答案
Binary Search the Answer
Problem Description
You are given a sequence .
You may perform operations on this sequence; each operation selects one element and adds to it. After at most operations, you want the minimum value of the sequence to be as large as possible. What is that maximum achievable minimum value?
Input Format
The first line contains two integers . The next line contains integers: .
Output Format
Output one line containing an integer: the answer.
Sample Input 1
5 10
1 4 2 6 8
Sample Output 1
5
Sample Input 2
1 10000000000000
100000000
Sample Output 2
10000100000000
Constraints
For of the data, $1 \leq n \leq 10^5, 1 \leq a_i \leq 10^8, 0 \leq k \leq 10^{13}$.
Hint
- After finishing this problem, please ask the teaching assistant for the -th stage test.