#M001. [模板题]矩阵乘法
[模板题]矩阵乘法
Problem Description
This is a template problem.
You are given two matrices and , where is of size and is of size . Your task is to compute the matrix product .
Input Format
The first line contains three positive integers , , and , representing the dimensions of the matrices.
The next lines each contain integers, representing matrix .
The following lines each contain integers, representing matrix .
Output Format
Output an -row by -column matrix, representing the result of the matrix multiplication . Each element of the result should be output modulo .
Example Input 1
3 4 5
-2 -8 -9 8
-10 0 6 -8
-10 -6 6 9
4 -7 5 -5 9
10 -2 -10 5 5
-3 -7 -3 8 -2
-6 7 7 3 -2
Example Output 1
999999898 149 153 999999929 999999951
999999997 999999979 999999883 74 999999921
999999835 103 55 95 999999857
Constraints and Hints
This problem involves performing matrix multiplication and ensuring that the result is output modulo .