View Code #include<stdio.h> #include<string.h> const int maxn = 20100; const int maxm = 200200; const int inf = 1<<29; struct node { int v, c, next; }edge[maxm*6]; int head[maxn], tot; int n, m; void init() { int i; for(i = 0; i <= n+2; i++) head[i] = -1; tot = 0; } voi... Read More
posted @ 2012-10-18 19:44
To be an ACMan
Views(143)
Comments(0)
Diggs(0)
1062* 昂贵的聘礼 枚举等级限制+dijkstra1087* A Plug for UNIX 2分匹配1094 Sorting It All Out floyd 或 拓扑1112* Team Them Up! 2分图染色+DP1122 FDNY to the Rescue! 最短路1125 Stockbroker Grapevine FLOYD1128 Frame Stacking 拓扑排序1135 Domino Effect 最短路 1149* PIGS 网络流1161* Walls Floyd1192 最优连通子集1201 Intervals 差分约束1236* Network of Read More
posted @ 2012-10-18 15:53
To be an ACMan
Views(340)
Comments(0)
Diggs(0)
为什么要拆点:2 410 0 0 0 110 0 0 0 010 0 1 1 110 0 1 1 1拆点10, 不拆点20做最大流的题目无非是这两步。1.建图2.套sap+gap优化的模板View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define maxn 106#define inf 1000000000int min(int a, int b){ return a < b ? a : b;}struct E{ int v, n Read More
posted @ 2012-10-18 15:31
To be an ACMan
Views(190)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号