Lang:G++
Edit12345678910111213141516171819202122232425262728293031/*************************************************************************> File Name: hiho60.cpp> Author: jluchuang> Mail: jlu_chuang@163.com> Created Time: 2015年08月23日 星期日 20时50分57秒************************************************************************/#include<iostream>#include<string>#include<vector>using namespace std;int get_max(int a, int b) {return (a > b) ? a : b ;}int matchingContentLength(string str1, string str2){if(str1.length() < 3 || str2.length() < 3) {return 0;}int len1 = str1.length();int len2 = str2.length();vector < vector<int> > dp(len1, vector<int>(len2, 0));vector < vector<int> > commonLen(len1, vector<int>(len2, 0));// Initialize commentLenfor(int i = 0; i < len1; i++) {if(str1[i] == str2[0]) {commonLen[i][0] = 1;}}