摘要:
矩阵快速幂代码: int n; // 所有矩阵都是 n n 的矩阵 struct matrix { int a[100][100]; }; matrix matrix_mul(matrix A, matrix B, int mod) { // 2 个矩阵相乘 matrix C; for (int i 阅读全文
摘要:
矩阵乘法代码: struct matrix { int n, m; int a[100][100]; }; // A.m == B.n matrix matrix_mul(matrix A, matrix B) { matrix C; C.n = A.n; C.m = B.m; for (int i 阅读全文