摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1300边双连通分量首先dfs找出桥并标记,然后dfs交叉着色找奇圈上的点。这题只要求在奇圈上的点个数。容易得到,一个边双联通分量如果存在奇圈,那么整个分量上的点都属于某个奇圈。#include#include#include#include#include#include#includeusing namespace std;const int maxn = 11150;const int maxe = 30100;const int INF = 0x3f3f3f;int pre[m 阅读全文
posted @ 2013-08-18 19:37 等待最好的两个人 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1291#include#include#include#include#include#include#includeusing namespace std;const int maxn = 11150;const int INF = 0x3f3f3f;int pre[maxn],low[maxn],dfs_clock;int bccnum[maxn],bcc_cnt; //记录每个点属于哪个边联通分量;bool isbridge[maxn*5]; //isbridge[i... 阅读全文
posted @ 2013-08-18 11:23 等待最好的两个人 阅读(203) 评论(0) 推荐(0) 编辑