摘要:
点击查看代码 #include<iostream> using namespace std; typedef long long LL; const int N = 20; int n, m; int p[N]; int main() { cin >> n >> m; for (int i = 0; 阅读全文
posted @ 2022-05-14 21:54
wKingYu
阅读(29)
评论(0)
推荐(0)
摘要:
点击查看代码 #include<iostream> using namespace std; typedef long long LL; const int mod = 1e9 + 7; int qmi(int a, int k) { int res = 1; while (k) { if (k & 阅读全文
posted @ 2022-05-14 21:05
wKingYu
阅读(46)
评论(0)
推荐(0)
摘要:
点击查看代码 #include<iostream> #include<vector> using namespace std; const int N = 5e3 + 10; int primes[N], cnt, sum[N]; bool st[N]; void get_primes(int n) 阅读全文
posted @ 2022-05-14 17:13
wKingYu
阅读(48)
评论(0)
推荐(0)
摘要:
复杂度 $ g(n) \ log(n) $ (来自 OI Wiki) 总体复杂度 $ 20 \times 10^{5} \times log(10^{5}) \times log(10^{18}) = 4 \times 10^{7} $ 点击查看代码 #include<iostream> using 阅读全文
posted @ 2022-05-14 15:53
wKingYu
阅读(69)
评论(0)
推荐(0)
摘要:
预处理 复杂度 \(O(n \cdot log(n))\) 总体复杂度 \(10^{5} \times log(10^{9}) = 3 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; typedef long long L 阅读全文
posted @ 2022-05-14 13:00
wKingYu
阅读(71)
评论(0)
推荐(0)
摘要:
递推 复杂度 \(O(n^{2})\) 总体复杂度 \(2000^{2} = 4 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; const int N = 2e3 + 10, mod = 1e9 + 7; int c[N 阅读全文
posted @ 2022-05-14 11:29
wKingYu
阅读(26)
评论(0)
推荐(0)

浙公网安备 33010602011771号