![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵快速幂
x_xueting
这个作者很懒,什么都没留下…
展开
-
矩阵快速幂
矩阵快速幂:求一个矩阵的幂 知识点参考该链接http://www.myexception.cn/arithmetic/1847338.html #include #include typedef struct mar { __int64 matrix[2][2]; } Mar; void print(Mar a) { int i,j;原创 2017-08-23 16:21:41 · 196 阅读 · 0 评论 -
POJ-3233 Matrix Power Series
原题链接:http://poj.org/problem?id=3233 这一题是求S=A+A^2+....+A^K的和矩阵(二分再二分) 贴我的矩阵快速幂(二分思想)模板链接:http://blog.csdn.net/x_xueting/article/details/77507566 然后就是求和的二分 举个例子当k=6时 A+A^2+A^3+A^4+原创 2017-08-23 16:04:49 · 187 阅读 · 0 评论