当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6929:Liner vectors

题目描述
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)
输入解释
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)$.
输出解释
If the vector group does not exist, output $-1$.

Otherwise output the minimum vector group, expressed in decimal notation.
输入样例
2
5 3
5 1
输出样例
7 11 13 14 19
1 2 4 8 16
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6929

最后修改于 2021-06-22T18:18:56+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/65536K(Java/Others)