結果

問題 No.1870 Xor Matrix
ユーザー pluto77pluto77
提出日時 2022-03-12 11:56:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 30,848 KB
最終ジャッジ日時 2023-10-15 00:07:10
合計ジャッジ時間 4,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 16 ms
8,032 KB
testcase_02 AC 15 ms
7,804 KB
testcase_03 AC 80 ms
21,264 KB
testcase_04 AC 129 ms
27,056 KB
testcase_05 AC 80 ms
26,988 KB
testcase_06 AC 89 ms
21,684 KB
testcase_07 AC 104 ms
23,876 KB
testcase_08 AC 109 ms
27,096 KB
testcase_09 AC 69 ms
21,324 KB
testcase_10 AC 94 ms
28,736 KB
testcase_11 AC 101 ms
29,492 KB
testcase_12 AC 105 ms
30,796 KB
testcase_13 AC 71 ms
18,924 KB
testcase_14 AC 130 ms
25,768 KB
testcase_15 AC 65 ms
18,456 KB
testcase_16 AC 76 ms
20,024 KB
testcase_17 AC 124 ms
30,848 KB
testcase_18 AC 103 ms
23,736 KB
testcase_19 AC 112 ms
26,348 KB
testcase_20 AC 82 ms
22,168 KB
testcase_21 AC 61 ms
19,592 KB
testcase_22 AC 80 ms
23,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1870
mod=998244353
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 i in range(m):
 c^=b[i]
if c:
 print(0)
 exit()
print(pow(2,(n-1)*(m-1)*20,mod))
0