- 博客(8)
- 收藏
- 关注
原创 POJ 1273 一般性预流推进
#include #include #include using namespace std; #define MIN(a,b) (a)<(b)?(a):(b) int m,n; int flow[202][202]; int cap[202][202]; int e[202]; int h[202]; void fun() { //Init memset(flow,0,sizeof(f
2012-04-28 20:07:51 432
原创 poj 1273 Dinic
#include #include #include #include using namespace std; #define MIN(a,b) (a)<(b)?(a):(b) int flow[205][205]; int cap[205][205]; int lev_net[205][205]; int mx[205]; bool fl[205]; int m,n; int res;
2012-04-26 11:40:26 448
原创 heap+prim
#include #include using namespace std; struct node { int num; int dis; node(int n,int d):num(n),dis(d){} node(){} }; int n; node h[500000]; void insert(node nd,int& len) {
2012-04-25 11:57:14 609
原创 Ford-furkson
int flow[205][205]; int cap[205][205]; int m,n;//m表示边数,n表示点数,均从1开始 int ford_furkerson() { int ret=0; bool fl[205]; int pre[205]; int ft[205]; while(1) { memset(fl,0,sizeof(fl)); memset(p
2012-04-21 23:55:00 443
原创 poj 1273 Ford_fulkerson
第一个网络流题,虽水还是记念一下,因为忘了将反向边每次更新,无耻的贡献了N次WA~用的是算法导论上的第一个算法,比较慢的Ford_fulkerson,广搜找增广路,每次记录每个节点的前驱节点以到该节点路径中的最小流#include #include #include #include using namespace std; int flow[205][205]; int cap[205][20
2012-04-20 17:15:18 646
原创 poj 1935 journey 树DP
Journey Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 1425 Accepted: 523 Description There are n cities in Byteland (numbered from 1 to n), connected b
2012-04-11 20:21:04 780
原创 POJ 3272 cow traffic
题目: Cow Traffic Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 3117 Accepted: 833 Description The bovine population boom down on the farm has caused serious congestion on the cow
2012-04-05 12:06:13 947 1
原创 poj 1087 a plug for unix
题目: A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10861 Accepted: 3562 Description You are in charge of setting up the press room for the inaugural meeting of the
2012-04-01 09:27:20 811
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人