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

建议使用的浏览器:

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

5269:ZYB loves Xor I

题目描述
Memphis loves xor very musch.Now he gets an array A.The length of A is n.Now he wants to know the sum of all (lowbit($A_i$ xor $A_j$)) $(i,j \in [1,n])$
We define that lowbit(x)=$2^{k}$,k is the smallest integer satisfied (($x$ and $2^k$)>0)
Specially,lowbit(0)=0
Because the ans may be too big.You just need to output $ans$ mod 998244353
输入解释
Multiple test cases, the first line contains an integer T(no more than 10), indicating the number of cases. Each test case contains two lines
The first line has an integer $n$
The second line has $n$ integers $A_1$,$A_2$....$A_n$
$n \in [1,5*10^4]$,$A_i \in [0,2^{29}]$
输出解释
For each case, the output should occupies exactly one line. The output format is Case #x: ans, here x is the data number begins at 1.
输入样例
2
5
4 0 2 7 0
5
2 6 5 4 0
输出样例
Case #1: 36
Case #2: 40
来自杭电HDUOJ的附加信息
Recommend hujie

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

题目来源 BestCoder Round #44

源链接: HDU-5269

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

共提交 0

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