結果

問題 No.1870 Xor Matrix
ユーザー lloyzlloyz
提出日時 2022-03-11 22:19:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 30,920 KB
最終ジャッジ日時 2023-10-14 07:32:30
合計ジャッジ時間 3,514 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,740 KB
testcase_01 AC 16 ms
8,092 KB
testcase_02 AC 15 ms
7,740 KB
testcase_03 AC 88 ms
21,440 KB
testcase_04 AC 134 ms
27,060 KB
testcase_05 AC 87 ms
26,968 KB
testcase_06 AC 94 ms
21,692 KB
testcase_07 AC 111 ms
23,780 KB
testcase_08 AC 114 ms
27,232 KB
testcase_09 AC 75 ms
21,376 KB
testcase_10 AC 102 ms
28,624 KB
testcase_11 AC 109 ms
29,544 KB
testcase_12 AC 114 ms
30,828 KB
testcase_13 AC 75 ms
18,720 KB
testcase_14 AC 126 ms
25,580 KB
testcase_15 AC 68 ms
18,640 KB
testcase_16 AC 80 ms
20,204 KB
testcase_17 AC 135 ms
30,920 KB
testcase_18 AC 102 ms
23,032 KB
testcase_19 AC 118 ms
26,316 KB
testcase_20 AC 91 ms
22,180 KB
testcase_21 AC 63 ms
19,760 KB
testcase_22 AC 84 ms
23,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
mod = 998244353

Axs = 0
for i in range(n):
    Axs ^= A[i]
Bxs = 0
for i in range(m):
    Bxs ^= B[i]

if Axs != Bxs:
    print(0)
    exit()

print(pow(2, 20 * (n - 1) * (m - 1), mod))
0