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.

hardikJain5 | 258 |

CodeBuddy | 250 |

bhatabhi554 | 232 |

Akkki111 | 197 |

clone | 174 |

KshatriyaYash | 1932 |

nikhil_sojan | 1374 |

lonecoder | 1236 |

SumitSingh27 | 1127 |

mazumderrohit8 | 1124 |

blackshadows | 5327 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4591 |

Quandray | 4444 |

Login to report an issue on this page.