Count the number of n x n matrices A satisfying the following condition modulo m.* Ai, j ∈ {0, 1, 2} for all 1 ≤ i, j ≤ n.* Ai, 1 + Ai, 2 + ... + Ai, n = 2 for all 1 ≤ i ≤ n.
Count the number of n x n matrices A satisfying the following condition modulo m. * Ai, j ∈ {0, 1, 2} for all 1 ≤ i, j ≤ n. * Ai, j = Aj, i for all 1 ≤ i, j ≤ n. * Ai, 1 + Ai, 2 + ... + Ai, n = 2 for all 1 ≤ i ≤ n. * A1, 1 = A2, 2 = ... = An, n = 0.
(图片来源网络,侵删)