第二部分 - 第九章 - 动态规划 - 动态规划经典题
NOIP666666666
厦门饮冰
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
练习4 - 鸡蛋的硬度
#include <cstdio>#include <algorithm>#include <cstring>using namespace std;const int Tmax=105,inf=0x3f3f3f3f;int f[Tmax][Tmax];int dp(int n,int m){ if(f[n][m]<inf) return f[n][m];//如果已经算过了就不需要再算了 , if(m==1) return f[n][.原创 2020-08-08 12:49:02 · 212 阅读 · 0 评论 -
练习3 - 糖果
#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>#include<sstream>using namespace std;#define L 101const int N=5,K=7; int a[L+1]={0,1,2,3,4,5};int f[L][L];//f[i][j]表示前i个.原创 2020-08-05 12:56:23 · 191 阅读 · 0 评论 -
练习2 - 计算字符串距离
#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>#include<sstream>using namespace std;#define L 101const int AL=5;const int BL=5;char a[AL+2]=".mnklj";char b[BL+2]=".j.原创 2020-08-05 12:55:47 · 131 阅读 · 0 评论 -
练习1 - 公共子序列
#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>#include<sstream>using namespace std;#define L 101const int AL=7;const int BL=6;int f[L][L];char z[L][L][L]; //1维char存储.原创 2020-08-05 12:54:50 · 191 阅读 · 0 评论
分享