题目链接 题意:求斐波那契第n项,只不过是最后m位。 思路:矩阵快速幂板子 #include <bits/stdc++.h> using namespace std; #define ll long long const int N=52; int mod=1000; struct Matrix { Read More
题目链接 题意:给定一个序列的变换,求变换r次后各项的值。 思路:矩阵快速幂+矩阵变换知识。 #include <bits/stdc++.h> using namespace std; #define ll long long const int N=52; const int mod=1000; Read More