![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵乘法
文章平均质量分 73
wwt9b15bs
这个作者很懒,什么都没留下…
展开
-
【题解】poj3070 Fibonacci 矩阵乘法
题目链接DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21...原创 2018-09-12 06:22:25 · 379 阅读 · 0 评论 -
【题解】CH3401 石头游戏 矩阵乘法+快速幂
题目链接描述石头游戏在一个 n 行 m 列 (1≤n,m≤8) 的网格上进行,每个格子对应一种操作序列,操作序列至多有10种,分别用0~9这10个数字指明。 操作序列是一个长度不超过6且循环执行、每秒执行一个字符的字符串。每秒钟,所有格子同时执行各自操作序列里的下一个字符。序列中的每个字符是以下格式之一: 数字0~9:表示拿0~9个石头到该格子。 NWSE:表示把这个格子内所有的...转载 2018-09-12 06:22:29 · 600 阅读 · 0 评论 -
【题解】poj3613[USACO 2007 November Gold].Cow Relays floyd+矩阵快速幂
题目链接DescriptionFor their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows have decided to run a relay race using the T (2 ≤ T ≤ 100) cow trails throughout the pasture.Each trail connects t...原创 2018-09-13 06:54:06 · 233 阅读 · 0 评论 -
【题解】洛谷P1306斐波拉契公约数 矩阵快速幂
题目链接题目描述对于Fibonacci数列:1,1,2,3,5,8,13…大家应该很熟悉吧~~~但是现在有一个很“简单”问题:第n项和第m项的最大公约数是多少?Update:加入了一组数据。输入输出格式输入格式:两个正整数n和m。(n,m<=10^9)注意:数据很大输出格式:Fn和Fm的最大公约数。由于看了大数字就头晕,所以只要输出最后的8位数字就可以了。输入输出样例...原创 2018-09-21 14:07:48 · 155 阅读 · 0 评论 -
【题解】[牛客OI周赛3-提高组]A.地斗主 矩阵快速幂
题目链接#include<cstdio>#include<cstring>typedef long long ll;int n,m,t,ans[5]={0,1,5,11,36};struct Matrix{ ll a[5][5];};Matrix operator *(Matrix a,Matrix b){ Matrix c;memset(c.a...原创 2018-10-28 19:59:41 · 255 阅读 · 0 评论