結果
問題 | No.1870 Xor Matrix |
ユーザー |
|
提出日時 | 2022-03-11 23:50:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 107,520 KB |
最終ジャッジ日時 | 2024-09-16 04:12:26 |
合計ジャッジ時間 | 2,931 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
N,M = map(int,input().split())A = list(map(int,input().split()))B = list(map(int,input().split()))s1 = A[0]s2 = B[0]mod = 998244353for i in range(1,M):s1 ^= B[i]for i in range(1,N):s2 ^= A[i]if s1 == s2:tmp = pow(2,(N-1) * (M-1),mod)ans = pow(tmp,20,mod)print(ans)else:print(0)