Dynamic programming example,subsequence