#2327. 异或求和函数的最大值
异或求和函数的最大值
Background
Special for beginners, ^_^
Description
有 个数 和一个数 ,表示按位异或。对于 $0\leq x\leq k ,f(x)=(x \oplus a_1)+(x \oplus a_2)……(x \oplus a_n)$。求 的最大值。
Format
Input
第一行两个数 和 。
第二行 个用空格隔开的整数 。
所有输入都是不超过 的整数。
Output
一行一个数表示答案。
Samples
6 7
1 1 4 5 1 4
28
Limitation
1s, 1024KiB for each test case.
相关
在下列比赛中: