Aditya has arranged some of his building blocks in N columns. Each column has a certain number of blocks given by an array A.

Each element of A(i.e. Ai) is the height of the ith column. Aditya now has M blocks left. He doesn't like small columns.

So he wants to maximum the minimum of all heights. He may or may not use all of the M blocks.

Determine the maximised height.

**Input : **

First line of input contains a single integer T denoting the number of test cases.

The first line of each test case contains 2 space-separated integers N and M denoting number of columns and number of blocks left respectively.

The second line contains N space-separated integers A1,A2,A3,...,AN denoting the heights of the columns.

**Output :**

For each test case, print the required answer in a new line.

**Constraints : **

1 <= T <= 100

1 <= N <= 200

1 <= M <= 10^4

1 <= Ai <= 10^4

**Example :
Input : **

3

5 6

1 2 3 4 5

3 4

2 8 9

6 3

1 1 2 2 1 2

4

6

2

**Explaination : **

Case 1 : Final heights of blocks - 4 4 4 4 5

Case 2 : Final heights of blocks - 6 8 9

Case 3 : Final heights of blocks - 2 2 2 2 2 2

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

jhasaurabh312 | 138 |

Aaaaarohiiii | 136 |

Harsha_kunchala | 128 |

tushki | 124 |

RajaRajput | 117 |

ARUN_PUNDIR | 617 |

manishgupta8497 | 607 |

Abhimanyu_kumar | 559 |

KhyatiSoneji | 501 |

Aman___Jain | 496 |

blackshadows | 5335 |

Ibrahim Nash | 5223 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.