結果

問題 No.1870 Xor Matrix
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-03-12 14:30:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 107,736 KB
最終ジャッジ日時 2023-10-15 03:36:33
合計ジャッジ時間 4,552 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,292 KB
testcase_01 AC 75 ms
71,524 KB
testcase_02 AC 75 ms
71,356 KB
testcase_03 AC 111 ms
99,804 KB
testcase_04 AC 126 ms
100,416 KB
testcase_05 AC 110 ms
100,392 KB
testcase_06 AC 118 ms
101,596 KB
testcase_07 AC 122 ms
102,832 KB
testcase_08 AC 122 ms
100,028 KB
testcase_09 AC 106 ms
95,364 KB
testcase_10 AC 120 ms
103,824 KB
testcase_11 AC 126 ms
99,388 KB
testcase_12 AC 125 ms
107,736 KB
testcase_13 AC 102 ms
93,928 KB
testcase_14 AC 129 ms
102,576 KB
testcase_15 AC 102 ms
93,020 KB
testcase_16 AC 105 ms
96,288 KB
testcase_17 AC 133 ms
100,048 KB
testcase_18 AC 118 ms
101,144 KB
testcase_19 AC 124 ms
100,808 KB
testcase_20 AC 115 ms
100,680 KB
testcase_21 AC 100 ms
90,692 KB
testcase_22 AC 109 ms
99,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ca,cb = 0,0
for a in A:
    ca ^= a
for b in B:
    cb ^= b

if ca != cb:
    print(0)
    exit()

mod = 998244353

ans = pow(1<<20,(n-1)*(m-1),mod)
print(ans)
0