Insider Subsequences

Before answering, Please go to [Insider Subsequences] (Contest Page | CodeChef)
In test case 1 of string length 3,
can we take the subsequence [1,1,5]?
if yes should M3 be 4?
if no, please tell me where am I wrong?
I don’t know if I can post this question when competition is going on?

Just a piece of advice for next time, please don’t post questions about ongoing contest in the discussion forum :slight_smile: !

No, you can’t take [1,1,5]. As , subsequence 1-1 does not have a 4-insider in it.