Im_hear

导航

2012年8月28日

zoj 1027

摘要: 题意为找到两字符串的最佳匹配,输出值。ps(如果要输出这种方案的话,怎么做呢?)注:d[x][y][0] = a[x]+b[y];d[x][y][1] = a[x]+'-';d[x][y][2] = '-'+b[y];code 阅读全文

posted @ 2012-08-28 17:04 Im_hear 阅读(119) 评论(0) 推荐(0) 编辑

zoj 1027

摘要: View Code 1 #include <cstdio> 2 #include <iostream> 3 #include <algorithm> 4 using namespace std; 5 6 int lena,lenb; 7 char a[101],b[101]; 8 int d[103][103][3] = {0}; 9 int ans =0;10 int cov[5][5]={{5,-1,-2,-1,-3},11 {-1,5,-3,-2,-4},12 {-2,-3,5,-2,-2},13 ... 阅读全文

posted @ 2012-08-28 16:58 Im_hear 阅读(162) 评论(0) 推荐(0) 编辑