版本比较
something about Matrix
正文
增加 4 行删除 4 行
114 行未改动全部展开11511611711811912012112212312412510 行未改动1361371381391401411421431443 行未改动14814915015115215315415515625 行未改动114 行未改动全部展开}void build() {for(int i = 1; i <= n; i++) a[i][i] = 1;}}a;node operator * (const node &x, const node &y) { // 运算符重载node z;for(int k = 1; k <= n; k++) {for(int i = 1; i <= n; i++) {for(int j = 1; j <= n; j++)10 行未改动}}node ans;ans.build();while(k) { //递推快速幂if(k & 1) ans = ans * a;a = a * a;k >>= 1;}3 行未改动}printf("\n");}return 0;}```::::25 行未改动114 行未改动全部展开11511611711811912012112212312412510 行未改动1361371381391401411421431443 行未改动14814915015115215315415515625 行未改动114 行未改动全部展开}void build() {for(int i = 1; i <= n; i++) a[i][i] = 1;}}a;node operator * (const node &x, const node &y) { // 运算符重载node z;for(int k = 1; k <= n; k++) {for(int i = 1; i <= n; i++) {for(int j = 1; j <= n; j++)10 行未改动}}node ans;ans.build();while(k) { //递推快速幂if(k & 1) ans = ans * a;a = a * a;k >>= 1;}3 行未改动}printf("\n");}return 0;}```::::25 行未改动