deleted deleted

deleted deleted

2 Likes

I think you have tried the same logic as I had.
Let me give example for a test case:-
Your logic may satisfy the sequence as shown below

1<2<3>2<3<4<5

so answer by your logic would be 5

but it shall be 4

as 1<2<3>1<2<3<4

Try hard and solve it

1 Like

Don’t discuss a problem which is in an ongoing contest. Ask them after the contest and we’ll be glad to help then!

You are not suppposed to ask or answer questions related to an ongoing contest! @admin what are you doing?

1 Like
//