結果

問題 No.1870 Xor Matrix
ユーザー ytqm3ytqm3
提出日時 2021-11-26 20:59:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 32,132 KB
最終ジャッジ日時 2023-10-14 05:18:46
合計ジャッジ時間 3,339 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,796 KB
testcase_01 AC 15 ms
7,804 KB
testcase_02 AC 15 ms
7,820 KB
testcase_03 AC 92 ms
21,420 KB
testcase_04 AC 127 ms
28,140 KB
testcase_05 AC 87 ms
26,932 KB
testcase_06 AC 97 ms
21,788 KB
testcase_07 AC 112 ms
23,780 KB
testcase_08 AC 116 ms
27,048 KB
testcase_09 AC 76 ms
22,108 KB
testcase_10 AC 100 ms
28,656 KB
testcase_11 AC 108 ms
29,368 KB
testcase_12 AC 115 ms
32,132 KB
testcase_13 AC 74 ms
19,008 KB
testcase_14 AC 131 ms
25,928 KB
testcase_15 AC 72 ms
18,504 KB
testcase_16 AC 82 ms
20,140 KB
testcase_17 AC 136 ms
30,868 KB
testcase_18 AC 100 ms
23,080 KB
testcase_19 AC 119 ms
26,304 KB
testcase_20 AC 92 ms
22,152 KB
testcase_21 AC 62 ms
19,548 KB
testcase_22 AC 85 ms
24,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = 0
for i in range(N):
  C ^= A[i]
for j in range(M):
  C ^= B[j]
if C == 0:
  print(pow(2, (N-1) * (M-1) * 20, 998244353))
else:
  print(0)
0