在矩阵快速幂中要注意可以把两个矩阵化为同大小的时候运算
#include#include #include using namespace std;const int MAX_N=62;int n;struct JuZhen{ int m[MAX_N][MAX_N];}a,b;JuZhen Mul(JuZhen x,JuZhen y){ JuZhen sum; memset(sum.m,0,sizeof(sum.m)); for(int k=0;k >1;} return s;}int main(){ memset(a.m,0,sizeof(b.m)); memset(b.m,0,sizeof(b.m)); cin>>n; for(int i=0;i >a.m[i][j]; } } for(int i=0;i >b.m[i][j]; } }}