Doubt in Challenge problem Maximizing LIS

I think the problem statement is not clear. It is said that if LB<=LA, then wrong answer. what if test case is this-> 7 3 1 2 3 4 6 5 7 In this case, LA is already 6, so the only possible soution is to make the array sorted, but it requires atleast k=4, otherwise we can not get LB>6. So please check this, and tell me if i got wrong.

Ask in the comment section please.


That LB<=LA instead of LB<LA made my life difficult. :frowning::frowning:

yes codechef will make ur life easier after contest. Do not talk about problems of ongoing contest.@admin keep eyes on this boy.