摘要: http://poj.org/problem?id=3686 1 #include 2 #include 3 #include 4 #define maxn 30000 5 using namespace std; 6 7 const int inf=1<<30; 8 int weight[51][maxn],lx[maxn],ly[maxn],match[maxn],a[51][51]; 9 bool sx[maxn],sy[maxn]; 10 11 int n,m; 12 13 bool path(int u) 14 { 15 sx[u]=true; ... 阅读全文
posted @ 2014-02-18 16:19 null1019 阅读(165) 评论(0) 推荐(0)
摘要: http://poj.org/problem?id=3308 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 10000 7 using namespace std; 8 9 const int inf=1q;19 memset(flow,0,sizeof(flow));20 f=0;21 for(; ;)22 {23 memset(a,0,sizeof(a));24 memset(p,-1,sizeof(p));25 a[s... 阅读全文
posted @ 2014-02-18 14:32 null1019 阅读(154) 评论(0) 推荐(0)
摘要: http://poj.org/problem?id=3352 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 300000 7 using namespace std; 8 9 const int inf=1>N>>E) 99 {100 inti();101 int x,y;102 for(int i=0; i<E; i++)103 {104 scanf("%d%d",&x,&y... 阅读全文
posted @ 2014-02-18 09:59 null1019 阅读(135) 评论(0) 推荐(0)
摘要: http://poj.org/problem?id=3114 1 #include 2 #include 3 #include 4 #include 5 #define maxn 300000 6 using namespace std; 7 8 const int inf=1dis[u]+w) 95 { 96 dis[v]=dis[u]+w; 97 return true; 98 } 99 return false;100 }101 102 bool spfa(int src)103 {104 mems... 阅读全文
posted @ 2014-02-18 08:22 null1019 阅读(162) 评论(0) 推荐(0)