hdu 4681 String(转载)
摘要:
#include #include #include #include using namespace std;#define maxn 1111char a[maxn],b[maxn],c[maxn];int dp1[maxn][maxn],dp2[maxn][maxn],n,m,len;struct node//记录在字符串a,b中,c串的首尾位置{ int x,y;};void lcs()//求最长公共子序列长{ int i, j,k; //从字符串左到右 for(i=0;i=0;i--) for(j=m-1;j>=0;j--) if(... 阅读全文
posted @ 2013-08-17 16:55 雨钝风轻 阅读(217) 评论(0) 推荐(0) 编辑