动态规划
pick豆子
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
滑雪--poj1088
#include<cstdio> #include<cstring> using namespace std; int s[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; int dp[109][109]; int a[100][100]; int n,m; int dfs(int i,int j) { if(dp[i][j]) return...翻译 2018-08-14 15:49:44 · 247 阅读 · 0 评论 -
poj-3903
Sample Input 6 5 2 1 4 5 3 3 1 1 1 4 4 3 2 1 Sample Output 3 1 1 求最长递增子序列,可以不连续 如1395738 为13578 输出长度5 #include<cstdio> #include<iostream> using namespace std; int dp[100005],s[100005]; int...原创 2018-09-25 21:03:07 · 238 阅读 · 0 评论 -
最大字段和
dp[i]数组方法 #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int main() { int a[100005]; int dp[100005]; int maxx=-999; int n,i; cin>...原创 2018-10-13 17:00:22 · 151 阅读 · 0 评论 -
最长公共子序列
#include<iostream> #include<cstring> using namespace std; int dp[100][100]; int main() { int i,j; char s1[100]; char s2[100]; cin>>s1>>s2; int n=strlen(s1);...原创 2018-10-28 10:06:55 · 123 阅读 · 0 评论
分享