In this question, if it is modeled as a tree then yes, there is only 1 separate city, that's intuitive, but there can be several cycles, here is where I am stumped.
I could consider a vertex to be a starting point and...
Do we have to assume that the number of roads before and after the reform are same?
Can someone please give me some hints to solve this problem. Thanks in Advance!!
Here is my explanation for the solution to this problem.
Ayush Srivastava's answer to What is the correct approach to solve the SPOJ problem 'Aggressive cow'?
Hoping that the solution will be clear.