
连通图
bupt_xycr
欢迎关注我的公众号:算法入门
熟悉
c++
caffe
pytorch
mxnet
tensorflow
深度学习
自动驾驶
点云
图像处理
编程比赛
python
java
展开
-
HDU 3861 The King’s Problem
http://acm.hdu.edu.cn/showproblem.php?pid=3861The King’s ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1828 Accepted Submission(s):原创 2016-04-21 18:59:37 · 251 阅读 · 0 评论 -
Kosaraju算法
Kosaraju的主要步骤:对G求伪拓扑排序对G进行转置得到GT (这里的GT是在输入的时候就确定的了)按照第一步得到的集合中顶点出现的顺序,对GT调用DFS得到若干颗搜索树每一颗搜索树就代表了一个强连通分量代码如下:vector G[maxn],G2[maxn];vectorS;int vis[maxn],sccno[maxn],scc_cnt;void dfs1(int u){ if(vis[原创 2016-04-21 18:59:32 · 355 阅读 · 0 评论 -
POJ 2186 Popular Cows
http://poj.org/problem?id=2186Popular CowsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 24347Accepted: 9992DescriptionEvery cow's dream is to become the most popular cow in the herd. In a h原创 2016-04-21 18:59:24 · 322 阅读 · 0 评论 -
POJ 2553 The Bottom of a Graph
http://poj.org/problem?id=2553The Bottom of a GraphTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 9130Accepted: 3789DescriptionWe will use the following (standard) definitions from graph the原创 2016-04-21 18:59:21 · 405 阅读 · 0 评论 -
POJ 1236 Network of Schools
http://poj.org/problem?id=1236 Network of SchoolsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 11919Accepted: 4750DescriptionA number of schools are connected to a computer network. Agr原创 2016-04-21 18:59:18 · 332 阅读 · 0 评论 -
Tarjan算法
Tarjan算法用于求有向图的强连通分量(强连通分支)。(1)”强连通分量“的概念: 有向图强连通分量在有向图G中,如果两个顶点vi,vj间(vi>vj)有一条从vi到vj的有向路径,同时还有一条从vj到vi的有向路径,则称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。有向图的极大强连通子图,称为强连通分量(strongly conn原创 2016-04-21 18:59:15 · 235 阅读 · 0 评论