結果

問題 No.1210 XOR Grid
コンテスト
ユーザー ntuda
提出日時 2025-11-25 14:24:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 82,272 KB
実行使用メモリ 134,780 KB
最終ジャッジ日時 2025-11-25 14:24:52
合計ジャッジ時間 7,874 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 57
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

MOD = 10 ** 9 + 7
N,M,X = map(int,input().split())
A= list(map(int,input().split()))
B = list(map(int,input().split()))

t1 = 0
for a in (A+B):
    t1 ^= a
if t1 == 0:
    ans = pow(pow(pow(2,N-1,MOD),M-1,MOD),X,MOD)
    print(ans)
else:
    print(0)
0