摘要: 类比完全背包 复杂度 \(O(n^{2})\) 总体复杂度 \(1000^{2} = 1 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; const int N = 1010, mod = 1e9 + 7; int n; 阅读全文
posted @ 2022-05-24 20:44 wKingYu 阅读(42) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n^{3})\) 总体复杂度 \(300^{3} = 2.7 \times 10^{7}\) 点击查看代码 #include<iostream> using namespace std; const int N = 300 + 10; int n; int s[N]; int f[N 阅读全文
posted @ 2022-05-24 20:10 wKingYu 阅读(69) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n \cdot m \cdot l^{2})\) 总体复杂度 \(1000 \times 1000 \times 10^{2} = 1 \times 10^{8}\) 点击查看代码 #include<iostream> #include<cstring> using namespac 阅读全文
posted @ 2022-05-24 17:48 wKingYu 阅读(39) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n^{2})\) 总体复杂度 \(1000^{2} = 1 \times 10^{6}\) 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n, m; char a[N], b[N]; in 阅读全文
posted @ 2022-05-24 17:07 wKingYu 阅读(36) 评论(0) 推荐(0)