cf678d专题

矩阵快速幂取模--cf678d Iterated linear function

所有线性变换可由矩阵表示。 #include <iostream> using namespace std; const int mod = 1e9 + 7; struct matrix{     long long m[2][2]; }; long long a,b,n,x; matrix multiple(matrix a,matrix b) {