1687.
Kanade's convolution
时间限制 5000 ms
内存限制 512 MB
Give you two arrays $A[0..2^m-1]$ and $B[0..2^m-1]$.
Please calculate array $C[0..2^m-1]$:
$$C[k]=\sum_{i~and~j=k}A[i~xor~j]*B[i~or~j]$$
You just need to print $\sum_{i=0}^{2^m-1}C[i]*1526^i ~mod~998244353$
$m<=19$
$0\leq A[i],B[i]< 998244353$
输入数据
输出数据
Output only one integer means the answer.
样例输入
复制
2
1 2 3 4
5 6 7 8
\n
\n
· · · \n
\n
· · · \n