#include <iostream> #include <algorithm> using namespace std; const int N=1010; int n, m; string a, b; int f[N][N];//f[i][j]表示a串前i个字符和b串前j个字符的最长公共子串 int main() { cin>>a>>b; n=a.size(), m=b.size(); a=" "+a, b=" "+b; if(n>m) swap(n, m), swap(a, b); string...