Update distinct subsequence

DP version, but need to improve to handle the -1 case