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

建议使用的浏览器:

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

6186:CS Course

题目描述
Little A has come to college and majored in Computer and Science.

Today he has learned bit-operations in Algorithm Lessons, and he got a problem as homework.

Here is the problem:

You are giving n non-negative integers $a_1,a_2,\cdots ,a_n$, and some queries.

A query only contains a positive integer p, which means you
are asked to answer the result of bit-operations (and, or, xor) of all the integers except $a_p$.
输入解释
There are no more than 15 test cases.

Each test case begins with two positive integers n and p
in a line, indicate the number of positive integers and the number of queries.

$2 \leq n,q \leq 10^5$

Then n non-negative integers $a_1,a_2,\cdots,a_n$ follows in a line, $0 \leq a_i \leq 10^9$ for each i in range[1,n].

After that there are q positive integers $p_1,p_2,\cdots,p_q$in q lines, $1 \leq p_i \leq n$ for each i in range[1,q].
输出解释
For each query p, output three non-negative integers indicates the result of bit-operations(and, or, xor) of all non-negative integers except $a_p$ in a line.
输入样例
3 3
1 1 1
1
2
3
输出样例
1 1 0
1 1 0
1 1 0
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6186

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

共提交 0

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