并查集
文章平均质量分 79
realxuejin
c/c 算法 网络
展开
-
【PAT】1034. Head of a Gang (30)
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 be t原创 2015-11-20 11:16:43 · 898 阅读 · 0 评论 -
【POJ】1611 The Suspects
Description Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best s原创 2015-11-16 21:18:23 · 334 阅读 · 0 评论 -
【POJ】2524 Ubiquitous Religions
Description There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your原创 2015-11-17 09:57:41 · 294 阅读 · 0 评论