407477: GYM102801 E Liner vectors

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Liner vectorstime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

Given you two integers $$$N$$$,$$$K$$$,you need to construct a set of $$$N$$$-dimensional vectors of size $$$N$$$.Each dimension of each vector can only be $$$0$$$ or $$$1$$$. And for a vector, its sum of all dimensions is $$$K$$$. Meanwhile, any vector can't be represented by other vectors using $$$XOR$$$ operation.

If such a vector group exists, find the minimum vector group, otherwise output $$$-1$$$. (Define the minimum set of vectors as the minimum lexicographic order after each vector is converted to binary)

Input

There are $$$T(1 \leq T \leq 1000)$$$ test cases in this problem.

For every test case,the first line has two integer $$$N(1 \leq N \leq 62)$$$,$$$K(1 \leq K \leq N)$$$.

Output

If the vector group does not exist, output $$$-1$$$.

Otherwise output the minimum vector group, expressed in decimal notation.

ExampleInput
2
5 3
5 1
Output
7 11 13 14 19
1 2 4 8 16

加入题单

上一题 下一题 算法标签: