結果

問題 No.1870 Xor Matrix
ユーザー ytqm3ytqm3
提出日時 2021-11-26 20:59:07
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 30,304 KB
最終ジャッジ日時 2024-09-16 00:41:42
合計ジャッジ時間 3,781 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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