結果
問題 |
No.1870 Xor Matrix
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:45:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,264 KB |
実行使用メモリ | 108,132 KB |
最終ジャッジ日時 | 2025-03-20 18:45:30 |
合計ジャッジ時間 | 3,831 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
MOD = 998244353 n, m = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) total_a = 0 for a in A: total_a ^= a total_b = 0 for b in B: total_b ^= b if total_a != total_b: print(0) else: exponent = (n - 1) * (m - 1) * 20 print(pow(2, exponent, MOD))