結果
| 問題 | No.1210 XOR Grid | 
| コンテスト | |
| ユーザー |  titia | 
| 提出日時 | 2020-08-30 17:06:41 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 252 ms / 2,000 ms | 
| コード長 | 287 bytes | 
| コンパイル時間 | 531 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 45,424 KB | 
| 最終ジャッジ日時 | 2024-11-15 12:52:09 | 
| 合計ジャッジ時間 | 8,753 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 57 | 
ソースコード
import sys
input = sys.stdin.readline
mod=10**9+7
N,M,X=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
XA=0
for a in A:
    XA^=a
XB=0
for b in B:
    XB^=b
if XA^XB!=0:
    print(0)
    sys.exit()
print(pow(pow(2,N*M-N-M+1,mod),X,mod))
            
            
            
        