Determinant modulo (p)
Work in
\[
\mathbb F_p,\qquad p=1\,000\,000\,007.
\]
Given an (n\times n) matrix (A), compute its determinant
\[
\det(A)\pmod p.
\]
Input
The first line contains (n). The next (n) lines contain (A).
Output
Print one integer equal to (det(A)) modulo (p). Any integer
representative of the residue is accepted.
Constraints
- \(1\le n\le 100\)
- Every matrix entry is an integer in \([0,p)\)