摘要: 复杂度 $O(n \cdot m)$ 总体复杂度 $ 1000 \times 1000 = 1 \times 10^{6} $ 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n, m; char a[N] 阅读全文
posted @ 2022-05-23 21:07 wKingYu 阅读(67) 评论(0) 推荐(0)
摘要: 贪心 + 二分 复杂度 \(O(n \cdot log(n))\) 总体复杂度 \(1 \times 10^{5} \times log(1 \times 10^{5} ) \approx 1.66 \times 10^{6}\) 点击查看代码 #include<iostream> using na 阅读全文
posted @ 2022-05-23 19:58 wKingYu 阅读(42) 评论(0) 推荐(0)
摘要: 线性 dp 复杂度 $ O(n^{2}) $ 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n; int a[N], f[N]; int main() { cin >> n; for (int i = 0 阅读全文
posted @ 2022-05-23 18:01 wKingYu 阅读(37) 评论(0) 推荐(0)