結果
| 問題 |
No.1870 Xor Matrix
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2022-03-11 23:17:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,377 ms / 2,000 ms |
| コード長 | 417 bytes |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 30,424 KB |
| 最終ジャッジ日時 | 2024-09-16 03:42:30 |
| 合計ジャッジ時間 | 12,864 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
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
for i in range(30):
ac=0
bc=0
for a in A:
if a & (1<<i) != 0:
ac+=1
for b in B:
if b & (1<<i) != 0:
bc+=1
if ac%2!=bc%2:
print(0)
exit()
ANS=pow(pow(2,(N-1)*(M-1),mod),20,mod)
print(ANS)
titia