摘要: E05 线性DP 最长公共子序列_哔哩哔哩_bilibili U197280 【模板】最长公共子序列 - 洛谷 // 线性DP O(n^2) #include<bits/stdc++.h> using namespace std; const int N=1010; int n,m; char a[ 阅读全文
posted @ 2023-04-09 23:12 董晓 阅读(1182) 评论(1) 推荐(1)
摘要: E04 线性DP 最长上升子序列 二分优化_哔哩哔哩_bilibili B3637 最长上升子序列 - 洛谷 // 二分+贪心 O(nlogn) #include<bits/stdc++.h> using namespace std; const int N=100010; int n,a[N]; 阅读全文
posted @ 2023-04-09 22:25 董晓 阅读(1175) 评论(1) 推荐(4)
摘要: E03 线性DP 最长上升子序列_哔哩哔哩_bilibili B3637 最长上升子序列 - 洛谷 // 线性DP O(n^2) #include<bits/stdc++.h> using namespace std; const int N=5010; int n,a[N],f[N]; //f[i 阅读全文
posted @ 2023-04-09 22:24 董晓 阅读(1030) 评论(0) 推荐(1)
摘要: E02 线性DP 数字三角形_哔哩哔哩_bilibili P1216 [IOI 1994 / USACO1.5] 数字三角形 Number Triangles - 洛谷 // 线性DP O(n^2) #include<bits/stdc++.h> using namespace std; const 阅读全文
posted @ 2023-04-09 18:45 董晓 阅读(870) 评论(0) 推荐(1)
摘要: E01 记忆化搜索 数字三角形_哔哩哔哩_bilibili P1216 [IOI 1994 / USACO1.5] 数字三角形 Number Triangles - 洛谷 // 记忆化搜索 O(n^2) #include<bits/stdc++.h> using namespace std; con 阅读全文
posted @ 2023-04-09 18:44 董晓 阅读(1001) 评论(1) 推荐(1)