Head of a Gang(并查集,多连通图)

题目描述 One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a relation is defined to
相关文章
相关标签/搜索