# 最长公共子串(连续) # LCS 是不连续的 二维动态规划 text1 = input() text2 = input() # abcdefghijklmnop # abcsafjklmnopqrstuvw # 动态规划 if len(text1) > len(text2): # 让text1为较短的, text1, text2 = text2, text1 rows, cols = len(text1), len(text2) dp = [[0] * cols for _ in range(rows)] # dp[i][j]代表以i,j结尾的最长公共子串 for r...