Https://www.codechef.com/viewsolution/35646358

https://www.codechef.com/viewsolution/35646358
why i am getting WA

You have sorted array.
They have given following condition,
1ij < klN

Since you have sorted.
its not necessary what ever you have sorted,
follow the given condition.

thanks

1 Like