2013年12月7日
摘要: http://poj.org/problem?id=1273用Dinic求最大流的模板题,注意会有重边。邻接矩阵建图 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn = 510; 7 const int INF = 0x3f3f3f3f; 8 int flow[maxn][maxn];//残量 9 int m,n;10 int dis[maxn];11 int bfs()//按层数“建”图,就是对每层的点用dis标记它到源点的层数12 {13 queueque;14 ... 阅读全文
posted @ 2013-12-07 14:52 straw_berry 阅读(205) 评论(0) 推荐(0) 编辑