SP2832 DETER3 - Find The Determinant III

Description

Given a NxN matrix A, find the [Determinant](http://en.wikipedia.org/wiki/Determinant) of A % P.

Input Format

Multiple test cases (the size of input file is about 3MB, all numbers in each matrix are generated randomly). The first line of every test case contains two integers , representing N (0 < N < 201) and P (0 < P < 1,000,000,001). The following N lines each contain N integers, the j-th number in i-th line represents A\[i\]\[j\] (- 1,000,000,001 < A\[i\]\[j\] < 1,000,000,001).

Output Format

For each test case, print a single line contains the answer.