[CF1856C] 冲向最大值 (To Become Max)
Problem Statement
You are given an integer array of length and an integer . At most times, you may pick an index () such that and set .
Find the maximum possible value of after at most operations.
Input
The first line contains (). Each test case has (, ) followed by (). The sum of does not exceed .
Output
For each test case, print the maximum achievable element value.
Example
3
3 5
1 2 3
4 2
2 1 2 1
5 10
5 1 5 1 5
4
3
7
Note
- Constraints:,,,,。
- Source:Codeforces 1856C · To Become Max