TOWCNT - please hack my solution

This is my code in C(getting WA) and I couldn’t find some hack case…

https://www.codechef.com/viewsolution/32095451

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 :slight_smile:

2 Likes

hmm,the code returns 1 2 1
UPD:Oh, I forget to fix the response order :frowning: