Andrey's submission of Longest Constrained Subsequence | CodeChef