結果

問題 No.1870 Xor Matrix
コンテスト
ユーザー flippergo
提出日時 2026-10-05 08:33:36
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 62 ms / 2,000 ms
+ 77µs
コード長 279 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 80 ms
コンパイル使用メモリ 81,144 KB
実行使用メモリ 123,060 KB
最終ジャッジ日時 2026-10-05 08:33:46
合計ジャッジ時間 3,766 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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