tushar gupta's submission of Beautiful Subsequence | CodeChef