結果
| 問題 | No.1210 XOR Grid | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-08-31 18:29:25 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 242 ms / 2,000 ms | 
| コード長 | 294 bytes | 
| コンパイル時間 | 323 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 44,576 KB | 
| 最終ジャッジ日時 | 2024-11-16 20:30:44 | 
| 合計ジャッジ時間 | 10,456 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 57 | 
ソースコード
n, m, x = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
mod = 10 ** 9 + 7
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))
            
            
            
        