distinct subsequences in c