// turn recursive backtrack version to iterative and reduce memory cost to O(m+n) , 312ms#include <cstdio> #include <cstring> #include <algorithm> #define MAXSIZE 1001 int LCSlength(char *s1, char *s2) { static int table[MAXSIZE<<1]; int len1,len2, i,j,k, *prev,*curr; len...