二分法矩阵求斐波那契(fibonacci)数列第n项
摘要:
http://blog.csdn.net/kz10211003/article/details/6871301void multiply(long a[][], long b[][], int MOD) { long c[][] = new long[2][2]; for (int i = 0; i < 2; ++i) { for (int j = 0; j < 2; ++j) { for (int k = 0; k < 2; ++k) { c[i][j] = (c[i][j] + (a[i][k] * b[k][j]) % MOD) % MOD; } } ... 阅读全文
posted @ 2013-04-19 15:16 Sure_Yi 阅读(306) 评论(0) 推荐(0) 编辑