Once upon a time, there was a segment tree of size .
Construct the array so that the value of cnt is maximum cnt after finishing all the operations.
The first line contains a single integer
![]()
- the number of test cases.
For each next
line, it contains two positive integers
![]()
- the size of the segment tree and the number of operations.
For each test case, output a single integer represents the answer - the maximum cnt you can get.