上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页
摘要: 复杂度 $ 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)
摘要: 复杂度 \(O(n^{3})\) 总体复杂度 \(100^{3} = 1 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; const int N = 110; int n, a[N][N]; int gauss() { i 阅读全文
posted @ 2022-05-12 17:53 wKingYu 阅读(59) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n^{3})\) 总体复杂度 \(100^{3} = 1 \times 10^{6}\) 点击查看代码 #include<iostream> #include<cmath> using namespace std; const int N = 110; const double ep 阅读全文
posted @ 2022-05-12 17:26 wKingYu 阅读(42) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; typedef long long LL; LL exgcd(LL a, LL b, LL & x, LL & y) { if (!b) { x = 1, y = 0; return a; } LL d = 阅读全文
posted @ 2022-05-11 23:38 wKingYu 阅读(51) 评论(0) 推荐(0)
摘要: 复杂度 \(O(log(n))\) 总体复杂度 \(10^{5} \times log(2 \times 10^{9}) \approx 4 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; typedef long lon 阅读全文
posted @ 2022-05-11 20:22 wKingYu 阅读(65) 评论(0) 推荐(0)
摘要: 复杂度 $ 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)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页