HELPBTW  Help BTW
BTW wants to buy a gift for her BF and plans to buy an integer array. Generally Integer arrays are costly and hence bought the cheapest one from the market. Her BF is very judgemental and assess the quality of the array by just looking at the smallest element in the array. Hence, she decided to improve the quality of the array. Increment operation on array elements are very costly and would take ONE FULL DAY to complete. Also, Increment operations can be done in parallel on at most M consecutive array elements. She only has K days left. Help BTW calculate the maximum possible “quality” of the array she can attain.
(BTW BTW is the name of the character :P )
Input
Very first line contains T – (number of test cases)
First line in each test case contains N – (size of the array BTW has bought from the market), M, K (days left)
Second line in each test case contains N integers (values of the initial array BTW bought from the market)
Output
Print the maximum possible “quality” she can attain.
Constraints
1<=T<=100
1<=N<=10^5
0<=M<=N
0<=K<=10^9
0<=Values of array<=10^9
Example
Sample test case 1
Input
3 2 1
2 2 3
Output
3
Sample test case 2
Input
3 2 1
2 3 2
Output
2
hide comments
:D:
20181024 23:59:40
Fun problem. Simple, buf fairy original, as far as I can tell. 

Acc:
20160827 19:53:46
this girl spent around 3 million years for this crap 

Mahammad Valiyev:
20160419 20:13:06
We have a solution but it gives wrong, I dont know why it could be related to the input as it is different from what's written in the statement. Does it contain multiple test cases? 

linkret:
20160406 17:55:18
Who cares that the samples don't show T _ 

savakr:
20160403 14:54:17
Sample cases don't show variable T!


ivanilos:
20151130 15:44:58
Can you update the sample test cases to show t? 
Added by:  Noob 
Date:  20151128 
Time limit:  2s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU JSMONKEY 