TRPLSRT - Editorial

Hi can someone help me . Im getting WA .
https://www.codechef.com/viewsolution/33559285

check at last when u r printing loop of k u coupled i,i+2,i+3 but when i inc then u have to erase elements also

1 Like

oh yeah thanks!

?? really ??
I am guessing all n permutations such that n[i] % 2 != 0

@shubham_169 Sir, if you can kindly clear this doubt of mine.
The 2nd type of operation you are doing involves placing 2 elements at their correct positions.What if after such one operation has been performed, you have a possibility again where you can place 3 elements in their correct position in a single swap?But, you perform another type 2 operation and thereby destroy that order? Will the 2nd type be necessarily effective in avoiding this situation?
Thanks in advance…