結果
問題 | No.1210 XOR Grid |
ユーザー |
![]() |
提出日時 | 2025-03-20 19:00:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 169 ms / 2,000 ms |
コード長 | 321 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,160 KB |
実行使用メモリ | 133,160 KB |
最終ジャッジ日時 | 2025-03-20 19:01:46 |
合計ジャッジ時間 | 9,372 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 57 |
ソースコード
MOD = 10**9 + 7 n, m, x = 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) * x print(pow(2, exponent, MOD))