摘要: 历时好几天,终于完工了!支持无向图四种功能:1.割点的求解2.割边的求解3.点双连通分量的求解4.边双连通分量的求解全部支持重边!!!!全部支持重边!!!!全部支持重边!!!!测试数据:10 111 53 54 52 42 34 66 86 77 88 108 9/*By:ZUFE_ZZT该模板经过... 阅读全文
posted @ 2015-08-03 16:42 Fighting_Heart 阅读(1709) 评论(0) 推荐(0)
摘要: Tarjan算法求解割点#include#include#include#include#includeusing namespace std;const int maxn=1111;//有多少个结点vectorG[maxn];int visited[maxn];//标记该节点有没有访问过int n... 阅读全文
posted @ 2015-08-03 16:36 Fighting_Heart 阅读(219) 评论(0) 推荐(0)
摘要: 可以转化成最小割的求解,题目其实就是要求把点分成两个集合,增加一个超级汇点,一部分的点在根节点所在集合内,一部分节点在超级汇点所在的集合内,这两就分开了,又要求费用最小,那么就是最小割。#include#include#include#include#include#include#includeu... 阅读全文
posted @ 2015-08-03 11:49 Fighting_Heart 阅读(181) 评论(0) 推荐(0)
摘要: 树形DP#include#include#include#include#includeusing namespace std;const int maxn=6666;int Ch[maxn];int dp[maxn][2];int n,u,v,node,tot;vector G[maxn];voi... 阅读全文
posted @ 2015-08-03 10:12 Fighting_Heart 阅读(126) 评论(0) 推荐(0)