数学
C20193620
A person can succeed at anything for which there is enthusiasm.
展开
-
【模板】Miller-Rabin素性测试与Pollard-Rho因数分解
#include<cstdio>#include<algorithm>using namespace std;typedef long long LL;const int prim[]={2,3,5,7,11,13,17,19,23,29};inline LL Add(LL a,LL b,LL mod){ LL ret=0; while(b) { i...原创 2019-09-17 22:07:42 · 229 阅读 · 0 评论 -
【模板】BSGS
模板题#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>using namespace std;typedef long long LL;#define hmod 1389001LL A,B,mod;inline LL Pow(LL a,LL b...原创 2019-10-03 10:48:02 · 173 阅读 · 0 评论 -
【模板】线性基
模板题#include<bits/stdc++.h>using namespace std;typedef long long LL;int n,cnt;LL a[100005],d[65],d1[65],s;inline void insert(LL x){ LL x1=x; for(int i=63;i>=0;i--) if(x1&(1ll&...原创 2019-10-03 10:53:53 · 156 阅读 · 0 评论