摘要: Description 每当西瓜的朋友来西瓜家看他,西瓜总是喜欢带他们逛自己的豪宅。西瓜的豪宅有N幢楼(1<=N<=1000),用1到N的整数编号。1号楼是西瓜豪宅的大门,N号楼是西瓜的储藏室。西瓜的豪宅里总共有M条道路(1<=M<=10000)。每条道路连接两栋不同的楼房,道路的长度不超过3500 阅读全文
posted @ 2017-04-17 21:38 Robin! 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 struct Edge { 7 int from, to, cap, flow, cost; 8 }; 9 10 ... 阅读全文
posted @ 2017-04-17 21:32 Robin! 阅读(1108) 评论(0) 推荐(0) 编辑
摘要: Dinic算法 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 阅读全文
posted @ 2017-04-17 20:34 Robin! 阅读(630) 评论(0) 推荐(0) 编辑