月度归档: 2022 年 9 月

3 篇文章

ModInt\mint 泛编程模板类
取模模板类 #define LL long long template<const int T> struct ModInt { const static int mod = T; int x; ModInt(int x = 0) : x(x % mod) {} int val() { return x; } ModInt operat…
Min25筛
理论 模板 #define ll long long inline ll V2IDX(ll v, ll N, ll Ndr, ll nv) { return v >= Ndr ? (N/v - 1) : (nv - v); } ll primesum(ll N) { //求取1~N的所有质数和 ll *S; ll *V; ll r = (ll…