图论
文章平均质量分 76
xiamiwage
这个作者很懒,什么都没留下…
展开
-
ZOJ 3396 Conference Call 求经过特定3点的最小生成树
//ZOJ 3396 Conference Call//题意 求经过特定3点的最小生成树//思路:枚举任何一点作为支撑点 ,特定的3点要相连必须经过共同的一点 ,求这三点到所枚举点的最短路和,取最小值即为答案#include#include#include#includeusing namespace std;#define INF 50000000#define N 2000原创 2012-09-27 00:32:37 · 781 阅读 · 0 评论 -
CodeForces 228E The Road to Berland is Paved With Good Intentions 2Sat求解
//CodeForces 228E The Road to Berland is Paved With Good Intentions 2Sat求解/*题目地址:http://codeforces.com/problemset/problem/228/E题意:一幅图,100个点,最多10000条边,边权为0或1,每次可以选择一个点,将与之相连的边取反(0变为1,1变为0)问最后能不原创 2012-10-05 00:48:12 · 1085 阅读 · 0 评论 -
HDOJ 3715 Go Deeper (2Sat: 二分答案判定)
//HDOJ 3715 Go Deeper (2Sat: 二分答案判定)/*题意:给定一个程序 ,求go(0, n, m)输出的值中的最大值 程序如下: go(int dep, int n, int m) begin output the value of dep. if dep < m and x[a[dep]] + x[b[dep]] != c[dep] then原创 2012-09-15 19:11:15 · 577 阅读 · 0 评论 -
UVA 10048 Audiophobia 最小生成树
//UVA 10048 - Audiophobia/*题意:n个点,m条无向路,每条路有一个噪音指数,从两点间的路径中选一条路,使这条路的最大噪音指数最小思路:排序+并查集 类似克鲁斯卡尔*/#include#include#include#includeusing namespace std;#define N 105int map[N][N];int c,s,q;原创 2012-09-16 10:43:33 · 696 阅读 · 0 评论