LouZhang

导航

2012年8月11日

poj_1459,sap的三种写法

摘要: 第一种是BFS的SAPbfs+sap#include<cstdio>#include<cstring>using namespace std;const int inf = 100000000;//不要开太大int n, np, nc, m;const int maxn = 105;int c[maxn][maxn];//残留网络int s, t;int level[maxn], gap[maxn];//层次网络, 层结点数(用于间隙优化)int q[maxn], pre[maxn];//队列, 前驱void init_sap(){ memset(level, 10, 阅读全文

posted @ 2012-08-11 17:20 louzhang_swk 阅读(287) 评论(0) 推荐(0) 编辑