动态规划。 while True: try: s1, s2 = input(), input() if len(s1) > len(s2): s1, s2 = s2, s1 m, n = len(s1), len(s2) dp = [0] * (n+1) max_lens = 0 idx = 0 a, b = 0, 0 # print(m, n) for i in range(1, m + 1): ...