distinct subsequences solved