結果

問題 No.1958 Bit Game
ユーザー prussian_coderprussian_coder
提出日時 2022-05-27 22:40:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 265 ms / 2,000 ms
コード長 354 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 81,868 KB
実行使用メモリ 176,300 KB
最終ジャッジ日時 2023-10-20 20:31:41
合計ジャッジ時間 7,820 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 259 ms
176,148 KB
testcase_01 AC 265 ms
176,156 KB
testcase_02 AC 258 ms
176,164 KB
testcase_03 AC 254 ms
176,156 KB
testcase_04 AC 255 ms
176,160 KB
testcase_05 AC 255 ms
176,160 KB
testcase_06 AC 251 ms
176,300 KB
testcase_07 AC 253 ms
176,160 KB
testcase_08 AC 250 ms
176,156 KB
testcase_09 AC 258 ms
176,156 KB
testcase_10 AC 102 ms
96,516 KB
testcase_11 AC 150 ms
111,680 KB
testcase_12 AC 173 ms
139,208 KB
testcase_13 AC 173 ms
126,380 KB
testcase_14 AC 160 ms
111,180 KB
testcase_15 AC 171 ms
147,468 KB
testcase_16 AC 136 ms
121,580 KB
testcase_17 AC 223 ms
160,572 KB
testcase_18 AC 208 ms
155,624 KB
testcase_19 AC 157 ms
128,640 KB
testcase_20 AC 170 ms
111,232 KB
testcase_21 AC 185 ms
149,400 KB
testcase_22 AC 112 ms
94,212 KB
testcase_23 AC 118 ms
100,496 KB
testcase_24 AC 206 ms
147,616 KB
testcase_25 AC 128 ms
105,120 KB
testcase_26 AC 168 ms
111,592 KB
testcase_27 AC 159 ms
140,048 KB
testcase_28 AC 193 ms
133,796 KB
testcase_29 AC 123 ms
107,828 KB
testcase_30 AC 36 ms
53,492 KB
testcase_31 AC 34 ms
53,492 KB
testcase_32 AC 42 ms
59,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,Y=map(int,input().split())
ans=0
mod=998244353
A=[int(x) for x in input().split()]
B=[int(x) for x in input().split()]
for i in range(18):
	a=0
	b=1
	p=sum([(A[j]>>i)&1 for j in range(X)])
	q=sum([(B[j]>>i)&1 for j in range(Y)])
	for _  in range(N):
		a,b=(a*X+b*p)%mod,b*(X-p)%mod
		a,b=a*q%mod,(a*(Y-q)+b*Y)%mod
	ans+=(1<<i)*a
	ans%=mod
print(ans)	
0