随笔分类 -  图论——杂类

摘要:题目链接:http://poj.org/problem?id=3469#include #include #include #include #include #include #include #define maxn 23000#define maxe 242000 using namespace std;const int INF = 0x3f3f3f;struct Edge{ int from,to,cap,flow; int next;};struct Dinic{ int s,t; int head[maxn]; int cur[maxn]; E... 阅读全文
posted @ 2013-08-02 11:53 等待最好的两个人 阅读(141) 评论(0) 推荐(0)
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3659 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int maxn = 200005; 9 int p[maxn],num[maxn];10 long long int sum[maxn];11 struct Edge{12 int u,v,c;13 bool operator rh.c;15 }16 ... 阅读全文
posted @ 2013-07-22 21:51 等待最好的两个人 阅读(148) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3367 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int maxn = 10005; 9 const int maxm = 100050;10 11 struct Edge{12 int u,v,c;13 bool operator rh.c;15 }16 };17 vector e;18 int p[maxn];19 int n,m; 2... 阅读全文
posted @ 2013-07-22 20:21 等待最好的两个人 阅读(178) 评论(0) 推荐(0)
摘要:欧拉回路相关定理:1 无向图为欧拉图,当且仅当为连通图且所有顶点的度为偶数。2 无向图为半欧拉图,当且仅当为连通图且除了两个顶点的度为奇数之外,其它所有顶点的度为偶数。3 有向图为欧拉图,当且仅当的基图连通,且所有顶点的入度等于出度。(忽略有向图所有边 的方向,得到的无向图称为该有向图的基图。)4 有向图为半欧拉图,当且仅当的基图连通,且存在顶点的入度比出度大1、的入度比出度小1,其它所有顶点的入度等于出度。 阅读全文
posted @ 2013-03-26 23:15 等待最好的两个人 阅读(257) 评论(0) 推荐(0)