博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- # 最长公共子序列的长度 def lcs_length(x, y): m = len(x) n = len(y) c = [[0 for _ in range(n + 1)]