摘要:
P5091 【模板】欧拉定理 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 ll qmul(ll a, ll b, ll mod) { 5 ll res = 0; 6 while (b) { 7 阅读全文
摘要:
P4718 【模板】Pollard-Rho算法 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 typedef __int128 lll; 5 char buf[700000000]; 6 int 阅读全文
摘要:
hdu2138 How many prime numbers 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 5 ll prime[6] = {2,3,5,233,331}; 6 ll qmul( 阅读全文
摘要:
P3390 【模板】矩阵快速幂 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 105, mod = 1e9+7; 5 ll n, k; 6 struct MAT 阅读全文