Runtime Error why ?? 
Difference between en1 and en2, changed 110 character(s)
https://mirror.codeforces.com/contest/616/submission/295220955↵

https://mirror.codeforces.com/contest/616/problem/C↵

This is my solution. It is coming runtime error in cf but it is coming correct for that particular test case in my editor. 
Ik it can be solved using normal dfs just wanna practice dsu so if anyone can help in this particular code.  

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English krish2004 2024-12-06 12:52:13 110
en1 English krish2004 2024-12-06 12:50:41 251 Initial revision (published)