正文
增加 5 行删除 5 行
46 行未改动4748495051525354558 行未改动6465666768697071727374757677787920 行未改动100101102103104105106107108109110111112113213 行未改动全部展开46 行未改动### 难度 8:::success[矩阵 (矩阵乘法+快速幂)]```cpp// Code By: zyx//#include <bits/stdc++.h>using namespace std;const int N = 105;8 行未改动for (int j = 1; j <= m; j ++ )a[i][j] = 0;n = 0, m = 0;}void init(mat x){n = x.n, m = x.m;for (int i = 1; i <= n; i ++ )for (int j = 1; j <= m; j ++ )a[i][j] = x.a[i][j];}mat operator * (const mat &t){mat ans = {n, t.m};for (int i = 1; i <= n; i ++ )for (int j = 1; j <= t.m; j ++ )20 行未改动if (b & 1) ans *= a;a *= a;b >>= 1;}return ans;}void please_ac(){}int main(){ios::sync_with_stdio(0);213 行未改动全部展开46 行未改动4748495051525354558 行未改动6465666768697071727374757677787920 行未改动100101102103104105106107108109110111112113213 行未改动全部展开46 行未改动### 难度 8:::success[矩阵 (矩阵乘法+快速幂)]```cpp// Code By: zyx//#include <bits/stdc++.h>using namespace std;const int N = 105;8 行未改动for (int j = 1; j <= m; j ++ )a[i][j] = 0;n = 0, m = 0;}void init(mat x){n = x.n, m = x.m;for (int i = 1; i <= n; i ++ )for (int j = 1; j <= m; j ++ )a[i][j] = x.a[i][j];}mat operator * (const mat &t){mat ans = {n, t.m};for (int i = 1; i <= n; i ++ )for (int j = 1; j <= t.m; j ++ )20 行未改动if (b & 1) ans *= a;a *= a;b >>= 1;}return ans;}void please_ac(){}int main(){ios::sync_with_stdio(0);213 行未改动全部展开