Minimum spanning tree problem


The code is giving run time error

Works fine on my side

but the code is not getting accepted, its giving run time error

Minute mistake , have mentioned in comment

Now it is giving wrong answer

Submit it now ->

i am failing all the test cases

Submit the last one i gave to you

I submitted that only. Still its giving wrong answer for all the test cases

I am talking About this code @jha.aparna17


Collaboration mode is showing your last submission was at 20:45, submit it now and see.

now it got submitted. Thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Can you please tell my why this code is not passing test case 4,5,6
Link:https://ide.codingblocks.com/s/478338
The question is same.