help in external contest code mania 2015

Can anyone provide with the test cases for which my solution is getting wrong answer… I have tried everything but couldn’t get it… In this solution I am storing for each star its parent and then at the end just counting the distinct parents… please it would be really helpful for me if someone can figure out some testcases…
The problem is CDMN03 (Galaxies and Beyond)
here’s the link:
http://www.codechef.com/viewsolution/6544378

Test this one:

1
9 67
60 16 70
-9 29 -7
20 88 45
55 90 64
35 -5 77
97 66 51
-2 19 27
27 15 56
-6 7 44

Your code prints 2 and 3 AC’ed code prints 1

1 Like

Thank you very much @rishabhprsd7 for looking into this matter… I have corrected my mistake and have submitted my solution and it has got accepted! :slight_smile: