摘要:
LL Pollard_Rho(LL n, LL c) { LL x, y, d; LL i = 1, k = 2; x = y = rand() % n; do { i++; d = gcd(n + y - x, n); if(d > 1 && d = n) t = Pollard_Rho(n, ra... 阅读全文
摘要:
#include using namespace std; /** //普通快速幂 LL pow_mod(LL a, LL x, LL p) { LL res = 1; while(x) { if (x & 1) res = (unsigned long long)res * a % p; x >>= 1; a = (unsign... 阅读全文