Give you two arrays A[0..2m−1] and B[0..2m−1].
Please calculate array C[0..2m−1]:
C[k]=∑i and j=kA[i xor j]∗B[i or j]
You just need to print ∑2m−1i=0C[i]∗1526i mod 998244353
m<=19
0≤A[i],B[i]<998244353
Output only one integer means the answer.
2
1 2 3 4
5 6 7 8
568535691
标程中 const int N=(1<<20); 改为const int N=(1<<19); 否则运行错误
Anything about this OnlineJudge, Please Contact Administrator. Click add QQ
OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap
Copyright 2016 ACM算法攻关部cnt: 43690
关于网站改版