Problem Statement
Among the elements of a permutation $P=(P_1,\ldots,P_N)$ of $(1,\ldots,N)$, those that satisfy the following condition are called good elements:
- The element can be included in both a longest increasing subsequence and a longest decreasing subsequence of
$P$.
You are given integers $N$ and $K$. Determine whether there exists a permutation $P$ of $(1,\ldots,N)$ such that there are exactly $K$ good elements, and if it exists, find one.
Answer for $T$ test cases.
Constraints
- All input values are integers
$1 \leq T \leq 2\times 10^5$$1 \leq N \leq 2\times 10^5$$0\leq K \leq N$- The sum of
$N$over all test cases does not exceed$2\times 10^5$.
Input
The input is given from Standard Input in the following format:
T
\mathrm{case}_1
\vdots
\mathrm{case}_T
Each test case is given in the following format:
N K
Output
Output $T$ lines.
For the $i$-th line, if there does not exist a permutation satisfying the condition for the $i$-th test case, output -1. If it exists, output one of them in the following format:
P_1 \ldots P_N
If there are multiple solutions satisfying the condition, any of them will be accepted.
样例
3
1 0
7 2
2 1
-1
7 4 6 2 3 1 5
-1
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。