AC代码: class Solution { public: int longestCommonSubsequence(string text1, string text2) { int dp[1005][1005] = {0}; int n = text1.size(); int m = text2.size(); for (int i = 1; i <= n; i++){ for (int j = 1; j <= m; j++){ if (text1[i-1] == text...