output_description: Print the number of possible (ordered) pairs of two matrices A and B (modulo
  10^9+7).
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      c_{1, 1} ... c_{1, N}
      :
      c_{N, 1} ... c_{N, N}
attempt: import sys
  
  readline = sys.stdin.readline
  readlines = sys.stdin.readlines
  sys.setrecursionlimit(10**7)
  
  import numpy as np
  
  MOD = 10**9 + 7
  
  N = int(readline())
  C = np.array([line.split() for line in readlines()], np.int8)
  
  
  def rank(A):
      if (A == 0).all():
          return 0
      i = np.nonzero(A[:, 0])[0]
      if len(i) == 0:
          return rank(A[:, 1:])
      i = i[0]
      temp = A[i].copy()
      A[i] = A[0]
      A[0] = temp
      A[1:] ^= A[1:, 0][:, None] * A[0][None, :]
      return 1 + rank(A[1:, 1:])
  
  
  r = rank(C)
  
  pow2 = np.ones(301, dtype=np.int64)
  for n in range(1, 301):
      pow2[n] = pow2[n - 1] * 2 % MOD
  
  # N次元空間から、M本のベクトルを選んで、D次元部分空間を生成する方法の個数
  dp = np.zeros((301, 301, 301), dtype=np.int64)
  dp[:, 0, 0] = 1
  for M in range(1, 301):
      dp[:, M, :M] += dp[:, M - 1, :M] * pow2[:M] % MOD
      dp[:, M, 1 : M + 1] += dp[:, M - 1, 0:M] * (pow2[:, None] - pow2[None, 0:M]) % MOD
      dp[:, M, :] %= MOD
  
  # C=ABのrankがrとなる方法の総数
  x = 0
  for n in range(r, N + 1):
      x += dp[N, N, n] * dp[N, n, r] % MOD * pow(2, N * (N - n), MOD) % MOD
  
  answer = x * pow(int(dp[N, N, r]), MOD - 2, MOD) % MOD
  print(answer)
  
problem_description: Statement
  
  Snuke received two matrices A and B as birthday presents. Each of the matrices
  is an N by N matrix that consists of only 0 and 1.
  
  Then he computed the product of the two matrices, C = AB. Since he performed
  all computations in modulo two, C was also an N by N matrix that consists of
  only 0 and 1. For each 1 ≤ i, j ≤ N, you are given c_{i, j}, the (i,
  j)-element of the matrix C.
  
  However, Snuke accidentally ate the two matrices A and B, and now he only
  knows C. Compute the number of possible (ordered) pairs of the two matrices A
  and B, modulo 10^9+7.
samples: [{"input": "2\n    0 1\n    1 0", "output": "6\n    \n\n* * *"}, {"input": "10\n    1 0 0 1 1 1 0 0 1 0\n    0 0 0 1 1 0 0 0 1 0\n    0 0 1 1 1 1 1 1 1 1\n    0 1 0 1 0 0 0 1 1 0\n    0 0 1 0 1 1 1 1 1 1\n    1 0 0 0 0 1 0 0 0 0\n    1 1 1 0 1 0 0 0 0 1\n    0 0 0 1 0 0 1 0 1 0\n    0 0 0 1 1 1 0 0 0 0\n    1 0 1 0 0 1 1 1 1 1", "output": "741992411"}]