結果

問題 No.1870 Xor Matrix
ユーザー SidewaysOwl
提出日時 2022-03-11 23:46:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 107,776 KB
最終ジャッジ日時 2024-09-16 04:07:55
合計ジャッジ時間 3,473 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
def cul(l):
    res = 0
    for i in range(len(l)):
        res ^= l[i]
    return res
if cul(a) == cul(b):
    mod = 998244353
    print(pow(2,(m-1)*(n-1),mod)**20 % mod)
else:
    print(0)
0