結果

問題 No.1870 Xor Matrix
ユーザー prussian_coder
提出日時 2022-03-19 16:07:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 101,368 KB
最終ジャッジ日時 2024-10-04 18:05:19
合計ジャッジ時間 4,203 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=[int(x) for x in input().split()]
B=[int(x) for x in input().split()]
mod=998244353
a=0
for i in range(N):
	a^=A[i]
b=0
for i in range(M):
	b^=B[i]	
if a!=b:
	print(0)
else:
	print(pow(2,(N-1)*(M-1)*20,mod))
0