
连通图
文章平均质量分 85
01的世界
有时,失去了才懂得珍惜
展开
-
2015 ACM/ICPC Asia Regional Changchun Online hdu 5438
题目:hdu 5438PondsTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 76 Accepted Submission(s): 28Problem DescriptionBetty owns原创 2015-09-13 23:01:20 · 351 阅读 · 0 评论 -
例题6-16 单词 并查集判断连通+有向图欧拉路规律
Play on WordsSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the pu原创 2015-09-27 21:01:48 · 614 阅读 · 0 评论 -
图论中的优先级搜索——DFS,BFS,Prim,Dijkstra
图论中的优先级搜索——DFS,BFS,Prim,Dijkstra 在图算法中经常要执行遍历每个顶点和每条边的操作,即图搜索。许多图算法都以图搜索为基础,如2-着色问题、连通性计算基于深度优先搜寻(depth-first search, DFS),而无权最短路径则基于广度优先搜索(breadth-first search, BFS)。基于搜索的算法还包括计算最小生成树的Prim算法转载 2015-07-12 22:22:05 · 3784 阅读 · 0 评论 -
poj 1236 Network of Schools(强连通分量)
Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13328 Accepted: 5330DescriptionA number of schools are connected to a computer network.原创 2015-08-20 14:37:49 · 267 阅读 · 0 评论 -
poj 2186 强连通分量
POJ 2186 Popular Cows(强连通分量)Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13835 Accepted: 5484DescriptionEvery cow's dream is to become原创 2015-08-19 21:30:47 · 341 阅读 · 0 评论 -
poj 2553 tarjan求强连通(第一道)
The Bottom of a GraphTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 7098 Accepted: 2905DescriptionWe will use the following (standard) definitions from原创 2015-08-19 16:02:30 · 332 阅读 · 0 评论 -
UVa 247 电话圈 floyd找环
题意:有n个人m通电话,如果有两个人相互打电话(直接或间接)则在同一个电话圈里。输出所有电话圈的人的名单。分析:用floyd求出两点之间是否有边,然后如果g[i][j]==g[j][i]==1,那么就放入一个连通分量,最后依次输出每个连通分量的所有边,注意输入输出格式,这地方坑了几次。放入一个连通分量用并查集做。每条边对应一个ID号用map去重。找连通分量lrj是用的dfs原创 2016-03-14 12:32:54 · 449 阅读 · 0 评论