Ive been struggling for 3 hours straight and I’m still not able to find the solution to and get an AC in the problem . You can get the question above .
I’m Actually storing the intervals in which there are strictly increasing elements .
and the I’m checking whether the two consecutive intervals can be our answer , as consecutive might have a case in which there is one element which should be removed , and the two intervals should be merged resulting in our answer . Thus iterating over all the intervals and storing the maximum possible answer , we should be able to tell our answer .
I’m Not able to get the answer , somebody Please help .
Also I would like to know how you people take care of the test cases , and how you guys debug the answer , and how can we debug the answer fast in contests . Are there any specific instructions/commands , that must be followed , how can we take care of the big test cases ???