![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
yo_haha
这个作者很懒,什么都没留下…
展开
-
dp hdu 1159 最大公共子序列
http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3§ionid=2&problemid=2 dp[i][j]=max(dp[i-1][j],dp[i][j-1]) s1[i]!=s2[j] dp[i][j]=dp[i-1][j-1]+1 s1[i]==s2[j]#include<stdio.h> #includ原创 2015-05-27 00:58:38 · 209 阅读 · 0 评论 -
dp hdu 1176
http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3§ionid=2&problemid=8 自底向上 状态转移方程为:dp[i][j]=max(dp[i+1][j-1],dp[i+1][j],dp[i+1][j-1])+pie[i][j]#include<stdio.h> #include<string.h.>原创 2015-05-27 00:52:24 · 192 阅读 · 0 评论 -
dp hdu 1003 maxsum
http://acm.hdu.edu.cn/showproblem.php?pid=1003#include <iostream> using namespace std; int a[100001]; int main() { int t,n,b,e,rb,maxx,sum,k; cin>>t; k=1; while(t--) { cin>>原创 2015-05-29 20:59:12 · 196 阅读 · 0 评论 -
dp hdu 1160 FatMouse's Speed
http://acm.hdu.edu.cn/showproblem.php?pid=1160#include <iostream> #include <algorithm> #include <cstdio> using namespace std; struct mice { int w,s,num,p; }; bool cmp(mice a, mice b) { if(a.w==原创 2015-05-29 21:00:14 · 215 阅读 · 0 评论