摘要:
题意:求最大环的边数,给出一个无向图,图中每条边的长度都是1,求图中最长环的长度是多少。分析:dfs , 开一个数组pan作访问标记View Code #include <cstdio>#include <cstring>#include <iostream>using namespace std;const int maxn = 5000 , maxm = 500050;int pan[maxn];bool vis[maxn];struct Edge{ int v , next; }edge[maxm];int E , head[maxn];int n , 阅读全文
posted @ 2012-07-03 01:44
lenohoo
阅读(200)
评论(0)
推荐(0)
浙公网安备 33010602011771号