結果

問題 No.1870 Xor Matrix
ユーザー roarisroaris
提出日時 2022-03-12 06:57:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 2,920 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 105,768 KB
最終ジャッジ日時 2023-10-14 18:20:43
合計ジャッジ時間 8,710 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,280 KB
testcase_01 AC 75 ms
71,180 KB
testcase_02 AC 76 ms
71,188 KB
testcase_03 AC 118 ms
98,260 KB
testcase_04 AC 125 ms
98,304 KB
testcase_05 AC 109 ms
99,020 KB
testcase_06 AC 117 ms
100,072 KB
testcase_07 AC 121 ms
101,316 KB
testcase_08 AC 122 ms
98,268 KB
testcase_09 AC 105 ms
94,280 KB
testcase_10 AC 117 ms
102,508 KB
testcase_11 AC 122 ms
98,208 KB
testcase_12 AC 123 ms
105,768 KB
testcase_13 AC 102 ms
92,888 KB
testcase_14 AC 127 ms
100,524 KB
testcase_15 AC 102 ms
91,908 KB
testcase_16 AC 106 ms
95,128 KB
testcase_17 AC 130 ms
100,108 KB
testcase_18 AC 117 ms
99,448 KB
testcase_19 AC 121 ms
99,028 KB
testcase_20 AC 113 ms
99,308 KB
testcase_21 AC 97 ms
89,812 KB
testcase_22 AC 106 ms
97,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AX = 0

for Ai in A:
    AX ^= Ai

BX = 0

for Bi in B:
    BX ^= Bi

if AX==BX:
    print(pow(2, 20*(N-1)*(M-1), 998244353))
else:
    print(0)
0