摘要: 矩阵快速幂代码: 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 阅读全文
posted @ 2019-01-22 19:44 fishers 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 矩阵乘法代码: 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 阅读全文
posted @ 2019-01-22 19:37 fishers 阅读(321) 评论(0) 推荐(0) 编辑