https://www.codechef.com/viewsolution/35646358
why i am getting WA
You have sorted array.
They have given following condition,
1 ≤ i ≤ j < k ≤ l ≤ N
Since you have sorted.
its not necessary what ever you have sorted,
follow the given condition.
thanks
1 Like