
ACM - Miller-Rabin
Scar_Halo
ITer
展开
-
Miller-Rabin
判断大素数、求所有因子、质因子namespace Factor {#define fi first#define se second#define pb push_back#define mp make_pair#define PLL pair<ll,ll>#define SZ(x) ((int)(x).size())#define all(x) (x).begin()...原创 2019-09-09 23:15:37 · 358 阅读 · 0 评论 -
求大数的欧拉函数
将 xxx 分解成若干质数的幂的乘,其中 p1,p2......pkp1,p2 ... ...pkp1,p2......pk 皆为质数x=p1n1×p2n2×......×pknkx = p_1^{n_1} \times p_2^{n_2} \times ... ... \times p_k^{n_k}x=p1n1×p2n2×......×pknkphi(x)=x(1−1/p1)(...原创 2019-09-17 16:39:36 · 774 阅读 · 1 评论