結果

問題 No.1870 Xor Matrix
ユーザー wolgnikwolgnik
提出日時 2022-03-11 22:04:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 106,056 KB
最終ジャッジ日時 2023-10-14 07:13:36
合計ジャッジ時間 4,442 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,444 KB
testcase_01 AC 79 ms
71,260 KB
testcase_02 AC 79 ms
71,516 KB
testcase_03 AC 114 ms
98,296 KB
testcase_04 AC 129 ms
98,560 KB
testcase_05 AC 111 ms
99,320 KB
testcase_06 AC 120 ms
100,196 KB
testcase_07 AC 125 ms
101,480 KB
testcase_08 AC 123 ms
98,452 KB
testcase_09 AC 106 ms
94,504 KB
testcase_10 AC 120 ms
102,536 KB
testcase_11 AC 124 ms
98,268 KB
testcase_12 AC 128 ms
106,056 KB
testcase_13 AC 108 ms
92,808 KB
testcase_14 AC 132 ms
100,684 KB
testcase_15 AC 103 ms
91,916 KB
testcase_16 AC 109 ms
95,156 KB
testcase_17 AC 133 ms
100,012 KB
testcase_18 AC 119 ms
99,640 KB
testcase_19 AC 125 ms
99,352 KB
testcase_20 AC 116 ms
99,612 KB
testcase_21 AC 101 ms
90,032 KB
testcase_22 AC 112 ms
97,900 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()))
mod = 998244353

xor = 0
for x in a: xor ^= x
for x in b: xor ^= x

if xor:
  print(0)
  exit(0)

print(pow(1 << 20, N * M - (N + M - 1), mod))
0