結果
| 問題 |
No.1210 XOR Grid
|
| コンテスト | |
| ユーザー |
dachengz
|
| 提出日時 | 2023-01-26 10:31:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 141 ms / 2,000 ms |
| コード長 | 282 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 82,120 KB |
| 実行使用メモリ | 120,176 KB |
| 最終ジャッジ日時 | 2024-06-27 06:48:55 |
| 合計ジャッジ時間 | 8,487 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 57 |
ソースコード
N, M, X = map(int, input().split())
A = map(int, input().split())
B = map(int, input().split())
tmp = 0
for a in A:
tmp ^= a
for b in B:
tmp ^= b
if tmp:
print(0)
else:
mod = 10 ** 9 + 7
mod1 = mod - 1
print(pow(2, (N - 1) * (M - 1) % mod1 * X % mod1, mod))
dachengz