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

建议使用的浏览器:

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

5650:so easy

题目描述
Given an array with $$n$$ integers, assume $f(S)$ as the result of executing xor operation among all the elements of set $S$. e.g. if $S = \{1,2,3\}$ then $f(S) = 0$.

your task is: calculate xor of all $f(s)$, here $s \subseteq S$.
输入解释
This problem has multi test cases. First line contains a single integer $T(T\leq 20)$ which represents the number of test cases.
For each test case, the first line contains a single integer number $n(1\leq n \leq 1,000)$ that represents the size of the given set. then the following line consists of $n$ different integer numbers indicate elements($\leq 10^9$) of the given set.
输出解释
For each test case, print a single integer as the answer.
输入样例
1
3
1  2  3
输出样例
0

In the sample,$S = \{1, 2, 3\}$, subsets of $S$ are: $\varnothing$, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}
来自杭电HDUOJ的附加信息
Recommend wange2014

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

源链接: HDU-5650

最后修改于 2020-10-25T23:24:30+00:00 由爬虫自动更新

共提交 0

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