結果

問題 No.1210 XOR Grid
ユーザー mlihua09
提出日時 2020-08-30 15:18:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 120,588 KB
最終ジャッジ日時 2024-11-15 08:50:05
合計ジャッジ時間 7,355 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 57
権限があれば一括ダウンロードができます

ソースコード

diff #


N, M, X = map(int, input().split())

P = 10 ** 9 + 7

x = 0

for a in map(int, input().split()):
    
    x ^= a
    
for b in map(int, input().split()):
    
    x ^= b
    
if x != 0:
    print(0)
    
else:
    print(pow(pow(2, M * N - M - N + 1, P), X, P))
0