CF1815D XOR Counting
题目描述
记 $\bigoplus$ 表示按位异或运算。
给定整数 $n,m$。
记一个序列 $a$ 是好的,当且仅当它是一个长度为 $m$ 的非负整数序列,且其元素之和恰好为 $n$。
求在好的序列 $a$ 中,$\bigoplus_{i=1}^ma_i$ 的所有可能取值之和对 $998244353$ 取模后的值。
**对于一个 $\bm{\bigoplus_{i=1}^ma_i}$ 的可能取值,无论有多少个可以取得这个值的好的序列 $\bm{a}$,这个值都应只被计入所求之和一次。**
每个测试点包含 $t$ 组数据。
输入格式
无
输出格式
无
说明/提示
For the first test case, we must have $ a_1=69 $ , so it's the only possible value of $ a_1 $ , therefore our answer is $ 69 $ .
For the second test case, $ (a_1,a_2) $ can be $ (0,5), (1,4), (2,3), (3,2), (4,1) $ or $ (5,0) $ , in which $ a_1\bigoplus a_2 $ are $ 5,5,1,1,5,5 $ respectively. So $ a_1\bigoplus a_2 $ can be $ 1 $ or $ 5 $ , therefore our answer is $ 1+5=6 $ .
For the third test case, $ a_1,a_2,\ldots,a_{10} $ must be all $ 0 $ , so $ a_1\bigoplus a_2\bigoplus\ldots\bigoplus a_{10}=0 $ . Therefore our answer is $ 0 $ .