結果

問題 No.1210 XOR Grid
コンテスト
ユーザー trineutron
提出日時 2021-05-09 21:29:12
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ac-library)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 218 ms / 2,000 ms
+ 438µs
コード長 254 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 719 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 50,412 KB
最終ジャッジ日時 2026-08-30 17:29:08
合計ジャッジ時間 13,252 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 57
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n, m, x = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
sa = 0
sb = 0
for i in a:
    sa ^= i
for i in b:
    sb ^= i
if sa != sb:
    print(0)
else:
    print(pow(2, (n - 1) * (m - 1) * x, 10**9 + 7))
0