Beautiful Subsequence, Code: BEAUSUB

Dear, if anyone is having Approach, solution or any idea about Beautiful Subsequence Problem Code: BEAUSUB please share it with me. I am waiting for your response.

Link to the problem :: Beautiful Subsequence | CodeChef

https://discuss.codechef.com/t/beausub-editorial/92783/33