Add solution to distinct subsequences