In the solution to Wormhole Sort(http://www.usaco.org/index.php?page=viewproblem2&cpid=992) the solution(https://usaco.guide/solutions/usaco-992?lang=cpp) mentions and uses the “component:” vector. I am unable to figure out what this vector does. Can anyone tell me the purpose of this vector in the solution? Thanks
Two points in a “component” mean that there is a way to traverse from one point to another through a set of edges!
2 Likes