DP: LCS with bottom-up