Longest Constrained Subsequence | CodeChef