P40 - Distinct Subsequences: Solución optimizada.