ACM: 图论题 poj 3177 同 3352
来源:互联网 发布:win7如何安装linux系统 编辑:程序博客网 时间:2024/05/20 01:09
Description
Given a description of the current set of R (F-1 <=R <= 10,000) paths that each connect exactly twodifferent fields, determine the minimum number of new paths (eachof which connects exactly two fields) that must be built so thatthere are at least two separate routes between any pair of fields.Routes are considered separate if they use none of the same paths,even if they visit the same intermediate field along the way.
There might already be more than one paths between the same pair offields, and you may also build a new path that connects the samefields as some other path.
Input
Lines 2..R+1: Each line contains two space-separated integers whichare the fields at the endpoints of some path.
Output
Sample Input
7 7
1 2
2 3
3 4
2 5
4 5
5 6
5 7
Sample Output
2
题意: 略
解题思路:
代码:
#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
#define MAX 10005
#define MAXSIZE 5005
struct node
{
}edges[MAX*3];
int n, m;
int first[MAX], num;
int stack[MAXSIZE], top, low[MAXSIZE], dfn[MAXSIZE], count;
int degree[MAXSIZE], bcc[MAXSIZE];
bool vis[MAXSIZE], g[MAXSIZE][MAXSIZE];
inline int min(int a, int b)
{
}
inline void add(int u, int v)
{
}
void readGraph()
{
}
void tarjan(int u, int fa, int deep)
{
}
int solve()
{
}
int main()
{
//
}
- ACM: 图论题 poj 3177 同 3352
- ACM: 数论题 toj3343 同 poj 1061
- ACM: 图论题 poj 2240 (floyd + ST…
- ACM: 图论题 poj 1135
- ACM: 图论题 poj 3…
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 3352 双连通题
- ACM: 二分法 数论题 poj 1905
- ACM: 匈牙利算法 图论题 poj 3041 …
- ACM: 差分约束 图论题 poj 2983 sp…
- ACM: 有向欧拉图 图论题 poj 1386 …
- ACM: polay定理 数论题 poj 1286 …
- ACM: 图论题 poj 2253 (poj上的dou…
- ACM: 二分图最佳匹配 图论题 poj 3…
- ACM: 二分图最大匹配 图论题 poj 2…
- ACM: 图论题 poj 1161 (把图重建成…
- ACM: 图论题 poj 1789 (一次AC的水…
- ACM: 图论题 poj 3…
- ACM: 动态规划题 poj&nb…
- ACM: 博弈题 poj 1143 状态压缩
- ACM: 图论题 poj 2186 强连通分量
- ACM: 图论题 poj 3352 双连通题
- ACM: 图论题 poj 3177 同 3352
- Android的自定义控件起步
- dos批处理中%~dp0%的说明
- ACM: 图论题 poj 3308 最大流问题
- ACM: 搜索题 poj 1020
- ACM: 图论题 poj 1201 差分约束
- ACM: 图论题 poj 1149 网络流问题
- ACM: 图论题 poj 1236 强连通
- ACM: 图论题 poj 1275 差分约束题