
强连通分量
sdjzujxc
这个作者很懒,什么都没留下…
展开
-
tajian求强连通——迷宫城堡
Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N和M条通道(M,每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否任意两个房间都是相互连通的,即:对于任意的i和j,至少存在一条路径可以从房间i到房间j,也存原创 2012-10-12 13:36:17 · 945 阅读 · 0 评论 -
hdu 3861
The King’s ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1091 Accepted Submission(s): 404Problem Description In the原创 2013-04-22 11:27:34 · 863 阅读 · 4 评论 -
poj 1523 割点分块
SPFTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4088 Accepted: 1889DescriptionConsider the two networks shown below. Assuming that data moves around th原创 2013-02-19 16:27:52 · 521 阅读 · 0 评论 -
poj 3177
Redundant PathsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6723 Accepted: 2924DescriptionIn order to get from one of the F (1 <= F <= 5,000) grazing f原创 2013-01-31 17:03:44 · 496 阅读 · 0 评论 -
poj 1144
NetworkTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7272 Accepted: 3415DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable原创 2013-01-30 11:46:07 · 382 阅读 · 0 评论 -
poj 3352 无向图
Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6503 Accepted: 3271DescriptionIt's almost summer time, and that means that it's almos原创 2013-01-29 15:25:17 · 551 阅读 · 0 评论 -
poj 2553
The Bottom of a GraphTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 7103 Accepted: 2907DescriptionWe will use the following (standard) definitions from g原创 2013-01-26 21:16:29 · 395 阅读 · 0 评论 -
求强连通分量的tarjan算法Gabow算法
求强连通分量的tarjan算法强连通分量:是有向图中的概念,在一个图的子图中,任意两个点相互可达,也就是存在互通的路径,那么这个子图就是强连通分量。(如果一个有向图的任意两个点相互可达,那么这个图就称为强连通图)。如果u是某个强连通分量的根,那么:(1)u不存在路径可以返回到它的祖先。(2)u的子树也不存在路径可以返回到u的祖先。· 例如:· 强连通分量。在一个非强连通图中转载 2013-01-28 15:36:40 · 2000 阅读 · 0 评论 -
poj 2186 tarjian与gabow算法
Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 18198 Accepted: 7330DescriptionEvery cow's dream is to become the most popular cow in the herd原创 2013-01-28 15:33:01 · 1303 阅读 · 0 评论 -
poj 2762
Going from u to v or from v to u?Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11871 Accepted: 3018DescriptionIn order to make their sons brave, Jiajia原创 2013-01-26 21:20:03 · 602 阅读 · 0 评论 -
poj 3114
Countries in WarTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1725 Accepted: 550DescriptionIn the year 2050, after different attempts of the UN to mai原创 2013-01-26 09:22:02 · 483 阅读 · 0 评论 -
hdu 1827
Summer HolidayTime Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 976 Accepted Submission(s): 415Problem DescriptionTo see a World i原创 2013-01-26 08:59:26 · 882 阅读 · 0 评论 -
hdu 2767
Proving EquivalencesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1426 Accepted Submission(s): 535Problem DescriptionConsider t原创 2013-01-26 11:30:43 · 611 阅读 · 0 评论 -
Network of Schools
题意:网络中的一学校可以将软件发送给其他一些学校,能够发送给谁取决于他们各自维护的一个清单。将学校看成一个节点,给出每个学校的维护清单,问至少需要复制几次软件,使毎个学校都能够得到该软件,在清单中至少添加几项,可使软件至少复制一次,所有学校都可以得到。思路:1、用Tarjan算法求出强连通分分量。2、缩点重新构图。3、分别求节点的出度和入度。第一个问题就是入度为零的个数,第二问题就是出原创 2012-10-12 13:39:03 · 305 阅读 · 0 评论 -
uva 10972 类似poj 3352
RevolC FaeLoNHopefully, you can remember Koorosh from one of the previous problems. Fortunately, Koorosh has solved Basm’s problem without your help! Now, he is a high-ranked advisor of Basm. As u原创 2013-04-22 11:44:07 · 673 阅读 · 0 评论