Nim is a two-pla
Alice and Bob is tired of playing Nim under the standard rule, so they want to play Nim randomly. On each turn, a pla
Alice will play first. Calculate the probability of Alice winning, modulo 998244353.
The input consists of multiple test cases. The first line contains a single integer T(1≤T≤500) - the number of test cases. Desc
The first line of each test case contains one integer n(1≤n≤10^5) - the number of heap(s).
The second line contains n integers a_1, a_2,……,a_n (1≤ai≤10^9) - the number of stone(s) of each heap.
It's guaranteed that ∑n≤10^6
2
2
1 1
1
2
0
499122177