
图论
文章平均质量分 67
daxiongrong
这个作者很懒,什么都没留下…
展开
-
【转载】poj 图论题目列表
<br />1062* 昂贵的聘礼 枚举等级限制+dijkstra<br />1087* A Plug for UNIX 2分匹配<br />1094 Sorting It All Out floyd 或 拓扑<br />1112* Team Them Up! 2分图染色+DP<br />1125 Stockbroker Grapevine FLOYD<br />1135 Domino Effect 最短路<br />1149* PIGS 网络流<br />1161* Walls floyd<br />12转载 2010-12-17 21:53:00 · 374 阅读 · 0 评论 -
poj pku图论、网络流入门题总结、汇总(转)
<br />POJ 2449 Remmarguts' Date(中等)<br />http://acm.pku.edu.cn/JudgeOnline/problem?id=2449<br />题意:经典问题:K短路<br />解法:dijkstra+A*(rec),方法很多<br />相关:http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1144<br />该题亦放在搜索推荐题中<br /><br />POJ 3013 - Big Chris转载 2010-12-17 22:03:00 · 770 阅读 · 0 评论 -
最小环 timus1004
#include #include using namespace std; const int maxn=1000; int n; int count=0; int ans=123456789; int dis[maxn][maxn]; int g[maxn][maxn]; int pre[maxn][maxn]; int road[maxn]; void init() { ans=123456789; for (int i=1;i原创 2010-11-02 23:58:00 · 328 阅读 · 0 评论 -
Timus 1022. Genealogical tree 拓补排序
#include using namespace std; #include int main() { freopen("in.txt","r",stdin); int n; int temp; int c[200]; int a[200][200]; int degree[200]; for (int i=0;i>n; for (int i=1;i>temp; while (temp!=0) { a[i][原创 2010-11-03 22:17:00 · 344 阅读 · 0 评论 -
timus graph theory
<br />1056 Computer net<br />#include<iostream> #include <stack> using namespace std; int n; int m,k; int a[10002][100]; int c[10002]; bool visit[10001]; int acount; int maxx; stack<int> vec; void init() { for (int i=0;i<=n;i++) {原创 2010-11-05 19:08:00 · 363 阅读 · 0 评论 -
二分图最大基数匹配 POJ 1274 The Perfect Stall
<br />最简单的二分图匹配,第一次写增广路算法。<br />#include<iostream> using namespace std; const int MAX=205; bool map[MAX][MAX]; int match[MAX]; bool vis[MAX]; int n,m; bool can(int t) { for(int i=1;i<=m;i++) { if(map[t][i] && 0==vis[i]) {原创 2010-11-14 13:58:00 · 431 阅读 · 0 评论 -
最小覆盖 Machine Schedule POJ 1325
每个工作用一条边代表,用最小的点覆盖所有的边,也就是找出最小覆盖。公式:最小覆盖=最大匹配;对原二分图做一次最大匹配#include using namespace std; const int MAX=1005; int map[MAX][MAX]; int match[MAX]; bool vis[MAX]; int n,m; bool can(int t) { for(int i=1;i原创 2010-11-14 16:03:00 · 395 阅读 · 0 评论