結果
問題 | No.1870 Xor Matrix |
ユーザー |
|
提出日時 | 2022-03-11 21:45:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 174 ms / 2,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 30,368 KB |
最終ジャッジ日時 | 2024-09-16 01:58:26 |
合計ジャッジ時間 | 3,855 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#技術室奥#5 Day2 で既出です。ごめんなさい https://yukicoder.me/problems/no/1210 n, m = map(int, input().split()) x = 20 a = list(map(int, input().split())) b = list(map(int, input().split())) mod = 998244353 ax, bx = 0, 0 for i in range(n): ax ^= a[i] for i in range(m): bx ^= b[i] if ax != bx: print(0) else: print(pow(pow(2, x, mod), (n - 1) * (m - 1), mod))