[dynamic programming] add distinct subsequences.