DISTINCT SUBSEQUENCES: solved with dynamic programming