![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
墨温温
呆萌理工女~ ~
展开
-
矩阵快速幂模板
//矩阵快速幂 struct matrix { int a[maxn][maxn] }origin,res; matrix mult(matrix x,matrix y) { matrix temp; memset(temp.a,0,sizeof(temp.a)); for(int i = 1;i <= maxn;i ++) for(int j = 1;j <= maxn;j原创 2015-07-25 17:12:35 · 258 阅读 · 0 评论 -
辗转相除法
long long gcd(long long a,long long b) { if(b==0) return a; return gcd(b,a%b); }原创 2015-07-17 17:14:34 · 308 阅读 · 0 评论