#P7112. 【模板】行列式求值
【模板】行列式求值
Description
Given an -order determinant , find . Output the result modulo .
Input Format
The first line contains two positive integers and .
Then follow lines. The -th line contains positive integers, where the -th number represents .
Output Format
Output the smallest non-negative integer value of modulo .
2 998244353
1 4
1 5
1
Hint
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号