会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ruo_yu
博客园
首页
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
下一页
2013年12月8日
poj 3281 最大流
摘要: /*思路:start=0为起点,1~F中每个点为每份food的编号,F+1~F+n中为每头牛的编号,另外F+n+1~F+n+n中也为每头牛的编号,F+n+n+1~F+n+n+D中每个点为每份drink的编号,F+n+n+D+1为终点; 从start到每份food连边,权值为1,; ...
阅读全文
posted @ 2013-12-08 10:59 ruo_yu
阅读(507)
评论(0)
推荐(0)
2013年12月7日
poj2516 最小费用最大流
摘要: #include "stdio.h" // 最小费用最大流 poj 2516#include "string.h"#include "queue"using namespace std;#define N 115#define INF 1000000000struct node { int u,v...
阅读全文
posted @ 2013-12-07 13:13 ruo_yu
阅读(328)
评论(0)
推荐(0)
2013年12月4日
poj 1149 PIGS 最大流
摘要: #include "stdio.h" //poj 1149 最大流#include "string.h"#include "queue"using namespace std;#define N 2250#define INF 0x3fffffffstruct node{ int u,v,w; ...
阅读全文
posted @ 2013-12-04 20:40 ruo_yu
阅读(156)
评论(0)
推荐(0)
poj 1459 最大流
摘要: #include "stdio.h" //poj 1459 最大流#include "string.h"#include "queue"using namespace std;#define N 205#define INF 0x3fffffffint n;bool mark;int map[N][...
阅读全文
posted @ 2013-12-04 19:25 ruo_yu
阅读(186)
评论(0)
推荐(0)
2013年12月3日
poj 3422
摘要: #include "stdio.h" //额,按最小费用最大流的模板来的!poj 3422#include "string.h"#include "queue"using namespace std;#define N 5005#define INF 0x3fffffffstruct node{ ...
阅读全文
posted @ 2013-12-03 19:34 ruo_yu
阅读(195)
评论(0)
推荐(0)
2013年11月29日
hdu 2686 最小费用最大流
摘要: #include "stdio.h" //hdu 2686 最小费用最大流#include "string.h"#include "queue"using namespace std;#define N 2005#define INF 0x3fffffffstruct node { int u,v,...
阅读全文
posted @ 2013-11-29 19:18 ruo_yu
阅读(149)
评论(0)
推荐(0)
2013年11月28日
图--二分匹配模板
摘要: #include "stdio.h" // 二分匹配 hdu 2063#include "string.h"#define N 1005int n,m;bool mark[N];int map[N][N],route[N];int find(int a) //找增广路{ int i; for(i=...
阅读全文
posted @ 2013-11-28 22:03 ruo_yu
阅读(192)
评论(0)
推荐(0)
字符串_字典树(模板 hdu 1251)
摘要: 例题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251代码: 1 #include "stdio.h" // 字典树模板题 hdu 1251 2 #include "string.h" 3 #include "stdlib.h" 4 5 struc...
阅读全文
posted @ 2013-11-28 15:29 ruo_yu
阅读(218)
评论(0)
推荐(0)
最短路 dijkstra模板
摘要: #include "stdio.h" //最短路 dijkstra模板 //hdu 1233#include "string.h"#define MAX 0x3fffffffint map[105][105];int main(){ int n,m; int x,y,k; int...
阅读全文
posted @ 2013-11-28 14:29 ruo_yu
阅读(182)
评论(0)
推荐(0)
最短路 kruskal模板
摘要: #include "stdio.h" //最短路 Kruskal算法 存边,排序,并查集合并,直至要求的两点相通,输出最小结果 //hdu 1233#include "stdlib.h"struct node{ int x,y; int w;}line[10005];int ans...
阅读全文
posted @ 2013-11-28 14:24 ruo_yu
阅读(248)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
下一页
公告