
强连通
文章平均质量分 74
ACder_chen
将AC进行到底
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj2186我的第一个强连通题目
#include #include #include #include #define debug puts("here") using namespace std; const int M = 10009; const int N = 50009; struct node { int v; int next; }num[N]; int sccf[M]; int low[转载 2013-11-01 20:43:45 · 965 阅读 · 0 评论 -
poj3352 Road Construction
#include #include #include #include using namespace std; const int M = 1005; struct node { int to; int next; }num[M*3]; stacks; int head[M]; int ins[M]; int dfn[M]; int low[M]; int sccf转载 2013-11-24 12:09:03 · 634 阅读 · 0 评论 -
hdu3072 Intelligence System
英语是硬伤啊, 每次都看不懂题意,各种查题意; 题意; 一点到另一点传消息, 两点间有费用, (每个强两通间不许要费用) 求消息传到个点,需要的最小费用,看懂题以后很简单 ;直接强联通缩点, 求最小费用;#include #include #include #include using namespace std; const int M = 50005; const int N =原创 2013-11-29 19:42:03 · 715 阅读 · 0 评论 -
hdu3639 Hawk-and-Chicken
刚看到此题, 感觉很简单,就顺着感觉写了。 后来,写不下去啦, 整不清楚了, 网上看了一下, 要建反图, 思路: 先建图, 后缩点,后根据缩后的点, 二次建图,但要建反图, 记录个缩点出度, 找出度为0 的, 进行一次dfs, #include #include #include #include using namespace std; const int M = 50005;转载 2013-11-29 17:07:42 · 926 阅读 · 0 评论 -
poj 2762 Popular Cows + 强连通 + 重构图 + 拓扑排序
/* 本题要判断图中两两可达, 在用强联通缩点后, 二次构图,进行拓扑排序, 在排序过程中若出现一个以上入度为零的点, 这次图不能满足 图中点两两可达, */#include #include #include #include using namespace std; const int M = 2005; const int N = 6005; struct node {原创 2013-11-30 11:32:28 · 790 阅读 · 0 评论 -
poj Network 强连通 + LCA + 桥
题意;给你一个无向连通图,每次加一条边后,问图中桥的数目#include #include #include #include using namespace std; const int M = 400005; struct node { int to; int next; }num[M]; int ins[M]; int dfn[M]; int low[M]转载 2013-12-01 22:32:33 · 760 阅读 · 0 评论 -
hdu3594
#include #include #include #include using namespace std; /* 题意; 满足两个条件 1;是一个强连通,2; 每条边仅属于一个环; */ const int M = 20005; const int N = 50005; struct node { int to; int next; }num[N];原创 2013-11-23 15:40:35 · 879 阅读 · 0 评论