摘要: 复杂度 $ O(log(n)) $ 总体复杂度 $ 10^{5} \times log( 2 \times 10^{9} ) \approx 4 \times 10 ^{6} $ 点击查看代码 #include<iostream> using namespace std; int exgcd(int 阅读全文
posted @ 2022-05-09 23:41 wKingYu 阅读(59) 评论(0) 推荐(0)
摘要: 复杂度 \(O(log(k))\) (k 是指数) 总体复杂度 \(10^{5} \times log(2 \times 10^{9}) \approx 4 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; typedef 阅读全文
posted @ 2022-05-09 21:38 wKingYu 阅读(44) 评论(0) 推荐(0)
摘要: 复杂度 \(O(log(k))\) (k 是指数) 总体复杂度 \(10^{5} \times log(2 \times 10^{9}) \approx 4 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; typedef 阅读全文
posted @ 2022-05-09 13:26 wKingYu 阅读(47) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n)\) 总体复杂度 \(10^{6}\) 点击查看代码 #include<iostream> using namespace std; const int N = 1e6 + 10; typedef long long LL; int primes[N], cnt; int eul 阅读全文
posted @ 2022-05-09 11:53 wKingYu 阅读(46) 评论(0) 推荐(0)
摘要: 复杂度 \(O(\sqrt{n})\) 总体复杂度 \(100 \times \sqrt{2 \times 10^{9}} \approx 4.5 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; void solve(in 阅读全文
posted @ 2022-05-09 09:37 wKingYu 阅读(47) 评论(0) 推荐(0)