結果

問題 No.1870 Xor Matrix
コンテスト
ユーザー 👑 rin204
提出日時 2022-03-11 21:37:08
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 101 ms / 2,000 ms
+ 42µs
コード長 249 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 258 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 127,744 KB
最終ジャッジ日時 2026-08-28 09:37:05
合計ジャッジ時間 4,646 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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