diff --git a/.ACM-Templates/LCS.cpp b/.ACM-Templates/LCS.cpp new file mode 100644 index 0000000..5660cc4 --- /dev/null +++ b/.ACM-Templates/LCS.cpp @@ -0,0 +1,30 @@ +/// LCS 最长子序列 +namespace LCS +{ +const int MAXLEN_A = 500; +const int MAXLEN_B = 500; +int dp[MAXLEN_A+5][MAXLEN_B+5]; +int deal(const char* a,const char* b) +{ + int lena=strlen(a); + int lenb=strlen(b); + for(int i=0;i