摘要:
用原根替换单位根做FTT,常用的质数是998244353,其最小原根为3; #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 1e6 + 5; const int mod = 9982443 阅读全文
摘要:
好难 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; const double pi = acos(-1); int n, m, rev[4 * N]; struct comp{ double x, y; com 阅读全文
摘要:
莫队有一种暴力的美感,它只是通过分块降低了暴力做法的复杂度 #include<bits/stdc++.h> using namespace std; const int N = 5e4 + 5; long long ans, out[N], n, m, k, a[N], b[N], tong[N]; 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; const int L = 105; const int mod = 1e4 + 7; int n, m, cnt, ans = 1, tr[L * 60][30], fail[L * 60], dp[L][L 阅读全文