图论-连通
Rogershy
选择不逃避,就是选择成长。github项目地址:https://github.com/sunhuanyao/
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 4738 Caocao's Bridges
题意:让你找一条权值最小的割边,如果该图本身就有孤立的连通块或点就直接输出0; 分析:很裸的边双连通问题,直接敲代码,只是有个很坑的地方:当求出的割边权值为0时,输出1,因为需要派遣一个人去放炸药。 附代码: #include #include #include using namespace std; const int INF = 0x3f3f3f3f; const int maxn原创 2013-09-15 17:45:59 · 895 阅读 · 0 评论 -
poj 3694 Network
分析:先缩点成树,然后模拟LCA过程。 #include #include #include #include using namespace std; const int maxn = 200500; //const int maxm = 405000; struct Node{ int v,next; }e[maxn*4],tree[maxn*4]; int bridge,vis原创 2013-11-01 20:24:38 · 493 阅读 · 0 评论
分享