結果
| 問題 |
No.1870 Xor Matrix
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-03-11 21:34:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 2,000 ms |
| コード長 | 312 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 107,904 KB |
| 最終ジャッジ日時 | 2024-09-16 01:41:49 |
| 合計ジャッジ時間 | 3,022 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
def xor(A):
x=0
for a in A:
x^=a
return x
def solve(N,M,A,B):
if xor(A)!=xor(B):
return 0
alpha=2**20
return pow(alpha,(N-1)*(M-1),Mod)
N,M=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
Mod=998244353
print(solve(N,M,A,B))
Kazun