#P2107. Spoj2832 Find The Determinant III
Spoj2832 Find The Determinant III
DETER3 - Find The Determinant III
题面翻译
题目描述
Given a NxN matrix A, find the Determinant of A % P.
给你一个 的矩阵 ,求出 的行列式的值模 。
输入输出格式
输入格式:
Multiple test cases (the size of input file is about 3MB, all numbers in each matrix are generated randomly).
多组测试数据(输入文件的大小大概为3MB,每个矩阵的所有的数都是随机生成的)。
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).
在每一个测试数据的第一行有2个整数 和 。接下来有 行,每一行有 个数,第 行的第 个数代表 。
输出格式:
For each test case, print a single line contains the answer.
对于每一个测试数据输出1行,为行列式的值。
感谢@IsaacOriTang 提供的翻译
题目描述
Given a NxN matrix A, find the Determinant of A % P.
输入格式
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).
输出格式
For each test case, print a single line contains the answer.
样例 #1
样例输入 #1
1 10
-528261590
2 2
595698392 -398355861
603279964 -232703411
3 4
-840419217 -895520213 -303215897
537496093 181887787 -957451145
-305184545 584351123 -257712188
样例输出 #1
0
0
2