結果

問題 No.1870 Xor Matrix
コンテスト
ユーザー rin204
提出日時 2022-03-11 21:37:08
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 249 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 130 ms
コンパイル使用メモリ 84,880 KB
実行使用メモリ 122,360 KB
最終ジャッジ日時 2026-04-05 05:34:19
合計ジャッジ時間 2,722 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

MOD = 998244353

n, m = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

x = 0
for a in A + B:
    x ^= a
if x != 0:
    print(0)
    exit()
    
ans = pow(1 << 20, (n - 1) * (m - 1), MOD)
print(ans)
0