AT_abc117_d [ABC117D] XXOR
题目描述
有n个数 $a_1,a_2,\dots,a_n$ 和一个数 $k$,$\oplus$ 表示按位异或。对于 $0\leq x\leq k,f(x)=(x \oplus a_1)+(x \oplus a_2)……(x \oplus a_n)$。求 $f_{\max}$ 为多少。
输入格式
一行两个数 $n,m$,接下来一行 $m$ 个用空格隔开的整数 $x_1,x_2,\dots,x_n$。
输出格式
一行一个数表示答案。
说明/提示
$1\leq n\leq 10^5,0\leq k,a_i\leq 10^{12}$。