
矩阵幂迭代
yuege38
在校学生,努力学习
展开
-
矩阵快速幂求斐波那契数列第n项
求斐波那契数列第 n 项#include#include#includeusing namespace std;typedef vector vec;typedef vector mat;const int mod = 10000;mat mul(mat A, mat B){ mat C(A.size(), vec(B[0].size(原创 2017-05-29 13:48:54 · 810 阅读 · 0 评论 -
HDU - 4565_So Easy!_共轭构造&&矩阵快速幂
题意A sequence S n is defined as: Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate S n. There are several test cases, each test case in one li原创 2017-11-07 21:25:15 · 249 阅读 · 0 评论 -
HDU - 2157_How many ways?_邻接矩阵的求路线方案数
题意给出一个图,其中有 a b 两点。问从 a 到 b 恰好经过 k 个点的路径有几种。原创 2017-11-08 23:30:42 · 420 阅读 · 0 评论 -
LightOJ - 1132_EXTENDED LIGHTS OUT_杨辉三角&&矩阵快速幂
题意Given N and K, you have to find(1^K + 2^K + 3^K + … + N^K) % 2^32原创 2017-11-08 23:33:30 · 283 阅读 · 0 评论 -
POJ3420_Quad Tiling_矩阵与递推
Quad TilingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4363 Accepted: 1996DescriptionTired of the Tri Tiling game finally, Michael turns to a more原创 2017-05-29 17:29:40 · 319 阅读 · 0 评论 -
POJ3233_Matrix Power Series_递推法|矩阵快速幂
Matrix Power SeriesTime Limit: 3000MS Memory Limit: 131072KTotal Submissions: 22749 Accepted: 9503DescriptionGiven a n × n matrix A and a positive integer k,原创 2017-05-29 15:58:09 · 304 阅读 · 0 评论 -
POJ3734_Blocks_快速幂求解递推问题
BlocksTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6657 Accepted: 3217DescriptionPanda has received an assignment of painting a line of blocks. Sin原创 2017-05-29 14:34:28 · 265 阅读 · 0 评论