結果

問題 No.1870 Xor Matrix
ユーザー minimumminimum
提出日時 2022-03-11 21:33:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 86,968 KB
実行使用メモリ 107,460 KB
最終ジャッジ日時 2023-10-14 06:25:54
合計ジャッジ時間 4,366 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,236 KB
testcase_01 AC 76 ms
71,272 KB
testcase_02 AC 77 ms
71,284 KB
testcase_03 AC 113 ms
99,448 KB
testcase_04 AC 131 ms
100,152 KB
testcase_05 AC 113 ms
100,428 KB
testcase_06 AC 121 ms
101,760 KB
testcase_07 AC 124 ms
102,936 KB
testcase_08 AC 125 ms
99,776 KB
testcase_09 AC 106 ms
95,112 KB
testcase_10 AC 122 ms
103,716 KB
testcase_11 AC 125 ms
99,304 KB
testcase_12 AC 128 ms
107,460 KB
testcase_13 AC 107 ms
93,340 KB
testcase_14 AC 133 ms
102,412 KB
testcase_15 AC 105 ms
92,844 KB
testcase_16 AC 109 ms
96,392 KB
testcase_17 AC 134 ms
99,920 KB
testcase_18 AC 122 ms
100,924 KB
testcase_19 AC 127 ms
100,648 KB
testcase_20 AC 118 ms
100,340 KB
testcase_21 AC 102 ms
90,424 KB
testcase_22 AC 113 ms
98,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ax = 0
for i in A:
    ax ^= i
bx = 0
for i in B:
    bx ^= i

if ax != bx:
    print(0)
else:
    print(pow(2, 20 * ((N - 1) * (M - 1)), MOD))
0