GALACTIK- WA help

dsu
galactik
union-find

#1

Solution seems fine to me. Please find where I am missing something.

link:- https://www.codechef.com/viewsolution/22020467