結果

問題 No.1210 XOR Grid
ユーザー marroncastle
提出日時 2020-08-30 16:09:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 414 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 132,556 KB
最終ジャッジ日時 2024-11-15 10:49:45
合計ジャッジ時間 8,201 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 57
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
  N, M, X = map(int, input().split())
  A = list(map(int, input().split()))
  B = list(map(int, input().split()))
  a = b = 0
  for i in range(N):
    a ^= A[i]
  for i in range(M):
    b ^= B[i]
  if a!=b:
    return 0
  mod = 10**9+7
  ans = pow(2,X*(N-1)*(M-1),mod)
  return ans
print(solve())
0