This is my code in C(getting WA) and I couldn’t find some hack case…
1
4 3
0 1 1
0 3 3
0 2 2
You made the same mistake I did, and forgot to preserve the initial order of the elements
2 Likes
hmm,the code returns 1 2 1
UPD:Oh, I forget to fix the response order