結果

問題 No.1870 Xor Matrix
コンテスト
ユーザー flippergo
提出日時 2026-10-05 08:33:36
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 74 ms / 2,000 ms
+ 393µs
コード長 279 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 94 ms
コンパイル使用メモリ 64,452 KB
実行使用メモリ 86,468 KB
最終ジャッジ日時 2026-11-27 23:35:39
合計ジャッジ時間 3,964 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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