并查集
文章平均质量分 79
IF_I
这个作者很懒,什么都没留下…
展开
-
A Bug's Life 【POJ--2492】【带权的并查集】
DescriptionBackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of th原创 2015-10-27 21:10:54 · 231 阅读 · 0 评论 -
The Suspects(POJ--1611
DescriptionSevere 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-08-11 10:52:34 · 206 阅读 · 0 评论 -
数据结构实验:连通分量个数
题目描述 在无向图中,如果从顶点vi到顶点vj有路径,则称vi和vj连通。如果图中任意两个顶点之间都连通,则称该图为连通图,否则,称该图为非连通图,则其中的极大连通子图称为连通分量,这里所谓的极大是指子图中包含的顶点个数极大。例如:一个无向图有5个顶点,1-3-5是连通的,2是连通的,4是连通的,则这个无向图有3个连通分量。 输入 第一行是一个整数T,表示有T组测试样例原创 2015-07-27 15:00:57 · 1233 阅读 · 0 评论 -
The Suspects
A B C DC - The SuspectsTime Limit:1000MS Memory Limit:20000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionSevere acute respiratory syndrome (SARS), an atyp原创 2015-02-02 14:22:06 · 300 阅读 · 0 评论 -
小希的迷宫
A B C DD - 小希的迷宫Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计原创 2015-02-02 14:14:08 · 360 阅读 · 0 评论 -
Ubiquitous Religions
A B C DB - Ubiquitous ReligionsTime Limit:5000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThere are so many different religions in原创 2015-02-02 14:11:24 · 250 阅读 · 0 评论 -
畅通工程
A B C DA - 畅通工程Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两原创 2015-02-02 14:07:22 · 246 阅读 · 0 评论 -
Colored Sticks(POJ--2513
DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoin原创 2015-08-13 20:49:45 · 265 阅读 · 0 评论