快速幂
Ilooker
这个作者很懒,什么都没留下…
展开
-
矩阵快速幂取模
矩阵快速幂=矩阵乘法+快速幂矩阵乘法 伪代码实现Mat operator*(Mat a,Mat b) { Mat c; for i:0 --> len for j:0-->len c.mat[i][j] = 0; for k:0-->len原创 2016-08-01 14:50:46 · 1710 阅读 · 0 评论 -
poj-3233-Matrix Power Series
矩阵快速幂点此查看原题链接Description Given a n × n matrix A and a positive integer k, find the sum S=A+A2+A3+…+Ak.S = A + A^2 + A^3 + … + A^k. Input The input contains exactly one test case. The first line of原创 2016-08-04 19:24:26 · 209 阅读 · 0 评论