![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DP
luxxxxxxx_
这个作者很懒,什么都没留下…
展开
-
树塔wenti
树塔问题是dp最简单的一类#include <iostream> #include <bits/stdc++.h> using namespace std; int n; int a[20][20],maxsum[20][20]; int main() { int c,n; cin>>c; while(c--) { ...原创 2018-04-03 21:58:56 · 235 阅读 · 0 评论 -
母牛的故事
点击打开链接#include <iostream> using namespace std; int f(int n); int main() { int n; while(cin>>n&&n!=0) { cout<<f(n)<<e...原创 2018-04-04 07:37:08 · 101 阅读 · 0 评论 -
hdoj 1087(递推)
点击打开链接#include <iostream> #include <cstdio> #include <cstring> using namespace std; int num[1010],dp[1010]; int main () { int n,Max; while (~scanf("%d",&n)) { ...原创 2018-04-04 15:45:11 · 220 阅读 · 0 评论 -
HDU 1176(状态递推)dp
点击打开链接类似三角型递推连续数字三角形整条小路长0-10 每次在不定位置落馅饼 先统计那一时刻落下几块馅饼依次递推即可代码#include <iostream> #include <bits/stdc++.h> using namespace std; int n; int a[100001][12]; int maxn(int a,int b,int c) { ...原创 2018-04-04 19:45:48 · 172 阅读 · 0 评论 -
入门dp hdu sum
点击打开链接#include<stdio.h> int main(){ int t, n, caseNum, maxSum, maxHere, beginMax, endMax, beginHere, endHere; int a[100002]; scanf("%d", &t); caseNum = 0; while(t--){ caseNum++; sca...原创 2018-04-04 21:07:33 · 147 阅读 · 0 评论 -
HDU1203-动态规划DP
Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这...转载 2018-04-05 03:18:45 · 161 阅读 · 0 评论 -
动态规划 记忆化搜索
点击打开链接点击打开链接比较典型的记忆化搜索原创 2018-04-05 13:44:17 · 222 阅读 · 0 评论 -
hdu 1506(dp求最大子矩阵)
点击打开链接面积=长*宽dp递推原创 2018-04-05 17:26:07 · 262 阅读 · 0 评论