
tarjan算法
淡蓝色的狼
这个作者很懒,什么都没留下…
展开
-
[kuangbin带你飞]专题九 连通图 F - Warm up HDU - 4612 缩点+树的直径
N planets are connected by M bidirectional channels that allow instant transportation. It’s always possible to travel between any two planets through these channels. If we can isolate some planets原创 2017-11-07 09:21:01 · 373 阅读 · 0 评论 -
[kuangbin带你飞]专题九 连通图 求桥(有坑点)
I - Caocao’s Bridges Caocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn’t give up. Caocao’s army still was not good at water battles, so he came up with another idea.原创 2017-11-03 20:27:22 · 272 阅读 · 0 评论 -
[kuangbin带你飞]专题九 连通图 求割点裸题
B - Network UVA - 315 A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same n原创 2017-11-03 19:39:47 · 300 阅读 · 0 评论 -
[kuangbin带你飞]专题九 连通图 ——tarjan算法+缩点
Network of Schools POJ - 1236 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 distrib原创 2017-11-03 19:11:32 · 316 阅读 · 0 评论 -
lca 离线tarjan模板
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=10101;const int qmaxn=501010;int F[maxn];int find(int x){ if(F[x]==-1)return x;原创 2017-10-14 20:37:10 · 367 阅读 · 0 评论 -
tarjan 离线 lca hdu2586
lca的离线操作:这篇博客写的很好 https://www.cnblogs.com/JVxie/p/4854719.html。。我实现的代码#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=80010;struct node{原创 2017-11-08 21:27:00 · 240 阅读 · 0 评论 -
hdu 1269 tarjan算法模板
#include<iostream>#include<stack>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=110000;struct node{ int v,next;}edge[maxn*3];int cnt=0,n,m,ans,top,原创 2017-10-13 21:54:46 · 345 阅读 · 0 评论 -
[kuangbin带你飞]专题九 连通图 Critical Links UVA - 796
In a computer network a link L, which interconnects two servers, is considered critical if there are at least two servers A and B such that all network interconnection paths between A and B pass throu原创 2017-11-07 22:33:28 · 348 阅读 · 0 评论 -
[kuangbin带你飞]专题九 连通图 Strongly connected HDU - 4635
Give a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the graph is still a simple directed graph. Also, after you add these edges, this原创 2017-11-07 11:29:21 · 252 阅读 · 0 评论 -
tarjan的应用 tarjan+缩点 Popular Cows POJ - 2186
Every cow’s dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, B) that tell...原创 2018-04-01 20:40:34 · 166 阅读 · 0 评论