题号:NC52860
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld
题目描述
Bobo learned the definition of determinant
)
of matrix A in ICPCCamp. He also knew determinant can be computed in
)
using Gaussian Elimination.
Bobo has an
%20%5Ctimes%20n)
matrix B he would like to find
)
modulo
)
for all

where

is the matrix after removing the j-th column from B.
输入描述:
The input contains zero or more test cases and is terminated by end-of-file. For each test case:
The first line contains an integer n.
The i-th of following n lines contains n integers
.
* 
* 
* The sum of n does not exceed 2000.
输出描述:
For each case, output n integers which denote the result.
备注:
For the second sample,
%20%3D%20%5Cmathrm%7Bdet%7D%20%5Cbegin%7Bbmatrix%7D%0A%20%20%20%202%20%26%200%20%5C%5C%0A%20%20%20%203%20%26%201%20%5C%5C%0A%5Cend%7Bbmatrix%7D%20%3D%202.)