#P1770B. Koxia and Permutation
Koxia and Permutation
No submission language available for this problem.
Description
Reve has two integers and .
Let be a permutation of length . Let be an array of length such that Let the cost of the permutation be the maximum element of .
Koxia wants you to construct a permutation with the minimum possible cost.
A permutation of length is an array consisting of distinct integers from to in arbitrary order. For example, is a permutation, but is not a permutation ( appears twice in the array), and is also not a permutation ( but there is in the array).
Each test consists of multiple test cases. The first line contains a single integer () — the number of test cases. The description of test cases follows.
The first line of each test case contains two integers and ().
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output integers , which is a permutation with minimal cost. If there is more than one permutation with minimal cost, you may output any of them.
Input
Each test consists of multiple test cases. The first line contains a single integer () — the number of test cases. The description of test cases follows.
The first line of each test case contains two integers and ().
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output integers , which is a permutation with minimal cost. If there is more than one permutation with minimal cost, you may output any of them.
Note
In the first test case,
- .
- .
- .
Therefore, the cost is . It can be proven that this is the minimal cost.