摘要:
#include<cstdio> #include<algorithm> #include<cstring> #include<cctype> #include<queue> #include<vector> using namespace std; const int maxn=100010; s 阅读全文
摘要:
【算法】高斯消元 【题解】 建矩阵; for i 找到同列绝对值最大数字; 交换; for k(行) j(列)(倒序) 除法; for i(倒序) for j 减去已知元素 除到右边; #include<cstdio> #include<algorithm> #include<cmath> #inc 阅读全文
摘要:
【算法】矩阵快速幂 【题解】T*A(n-1)=A(n)矩阵如下: a 1 * x(n-1) 0 = xn 0 0 1 c 0 c 0 防止溢出可以用类似快速幂的快速乘。 #include<cstdio> #include<algorithm> #define ll long long using n 阅读全文