replaced an ad hoc solution to uva00599 (The Forrest for the Trees), with the graph-property solution (joined components = v - e) - this way it is simpler (less code) and more efficient