What is wrong with this solution of Ancient Berland Roads

Why am I getting wrong answer for this solution of Ancient Berland Roads ??

Link to problem :

https://www.codechef.com/LTIME31/problems/ABROADS

@likecs
help me out.

@admin

@admin1

This is the problem from December lunch time, I solved this problem after referring to the editorial but my solution is not passing the first test case, it’s giving NZEC error. Can you please provide me with the test cases of this problem.

Help me out I have banged my head to much on it but not able to get the glitch.

Thanks in advance.