码迷,mamicode.com
首页 >  
搜索关键字:强连通分量    ( 850个结果
ZOJ 2588 Burning Bridges(强连通分量)
题目地址:ZOJ 2588 因为数组开小了而TLE了。。这题就是一个求无向连通图最小割边。只要判断dfn[u]是否 代码如下; #include #include #include #include #include #include #include #include #include #include #include using namespace std; i...
分类:其他好文   时间:2014-08-26 00:36:15    阅读次数:320
POJ 1236 Network of Schools(强连通分量)
题目地址:POJ 1236 这个题的大意是求最少往多少点发送消息可以使任意一个点都能收到消息和最少增加多少条边可以使图为连通图。对于第一个问题,可以求入度为0的强连通块的块数,因为只有入度为0的强连通块是无法从外界接受信息的,而只要有一个入度的话,那整个连通块就都可以接收到信息。第二个问题则是求入度为0的强连通块与出度为0的强连通块的个数的最大值。 代码如下: #include #incl...
分类:Web程序   时间:2014-08-25 21:17:24    阅读次数:287
HDU 2767 Proving Equivalences(强连通分量)
题目地址:HDU 2767 这题的意思是求再加多少边可以使得图为强连通图。 方法是先缩点,缩点很简单,只要加个数组,在找到一个强连通分量的时候让那些点都标记为该强连通分量的标号即可。 然后再遍历一遍所有边,如果该边的起点和终点不在同一个强连通分量里边,那这两个点的入度和出度就可以算作是该强连通分量的入度和出度的一部分,累加上去。最后分别统计入度和出度为0的强连通分量个数,取最大值就是答案。道...
分类:其他好文   时间:2014-08-25 19:27:04    阅读次数:195
HDU 1269 迷宫城堡(强连通分量)
题目地址:HDU 1269 强连通分量裸题。。只要判断是否只有一个强连通分量就可以。 代码如下: #include #include #include #include #include #include #include #include #include #include #include using namespace std; int head[20000],...
分类:其他好文   时间:2014-08-25 17:08:54    阅读次数:153
POJ 3114 Countries in War(强联通分量+Tarjan)
题目链接题意 : 给你两个城市让你求最短距离,如果两个城市位于同一强连通分量中那距离为0.思路 :强连通分量缩点之后,求最短路。以前写过,总感觉记忆不深,这次自己敲完再写了一遍。 1 #include 2 #include 3 #include 4 #include 5 #incl...
分类:移动开发   时间:2014-08-24 22:05:23    阅读次数:301
POJ2375 Cow Ski Area 【强连通分量】+【DFS】
Cow Ski Area Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2323   Accepted: 660 Description Farmer John's cousin, Farmer Ron, who lives in the mountains of...
分类:其他好文   时间:2014-08-24 16:45:12    阅读次数:186
POJ1236 Network of Schools 【强连通分量Garbow】
Network of Schools Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11180   Accepted: 4448 Description A number of schools are connected to a computer netwo...
分类:Web程序   时间:2014-08-24 09:10:22    阅读次数:309
POJ2186 Popular Cows 【强连通分量Kosaraju】
Popular Cows Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 23445   Accepted: 9605 Description Every cow's dream is to become the most popular cow in the ...
分类:其他好文   时间:2014-08-20 18:00:02    阅读次数:263
[POJ 2762]Going from u to v or from v to u? (强连通分量+拓扑排序)
Description In order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time, Wind choose two rooms x and y, an...
分类:其他好文   时间:2014-08-15 00:06:46    阅读次数:331
[POJ 1236][IOI 1996]Network of Schools
Description A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the ...
分类:Web程序   时间:2014-08-12 19:01:14    阅读次数:471
850条   上一页 1 ... 79 80 81 82 83 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!