Solve the distinct subsequence problem using a simplified DP solution.