Does the Question say that the sub sequence s[1],s[2], …,s[k] be the continuous elements of array a, but not randomly picked elements in an ascending order.
For example
Let A= { 1,2,3,4,5,6,7,8}
then
Sub sequence possible can be S={ 2,3,4,5}
But S={ 2,4,7 } is NOT possible.
just confused about sub sequence, cleared about the AP.
Thanks
Subsequence 2,4,7 is possible. The problem statement clearly states that new sequence is obtained by deleting elements from the sequence. Read the problem statement a few more times keeping a few test cases in mind and you will understand it better.
He was forced to ask a doubt here instead of on the problem page. I hope that admin at least tell us that what we wish to comment is not acceptable.
I had also posted some comments, but they have gone to admin for processing. I dont think it was a bad question and perhaps would have helped lots of people. Some might rue a missed chance at the end of contest as my question was not published as a comment.