摘要: /*构图很重要,每个点可以拆开成两点两点之间连边,一条边是容量为1的正常边,一天变为容量很大的边,为了避免费用的多次计算设置的边,因为没个点都可以多次经过为了不多次计算费用,所以要多设置这条边,这也是这道题的精华之处此题是最大费用最大流*/// include file#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <cctype>#include <ctime>#include <iostream>#i 阅读全文
posted @ 2011-03-18 21:38 AC2012 阅读(236) 评论(0) 推荐(0) 编辑
摘要: /*很明显是最小费用最大流,中间所有的路径的流都是1,费用是路径长度 由于顶点太多,必须使用邻接表了*/// include file#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <cctype>#include <ctime>#include <iostream>#include <sstream>#include <fstream>#include <iomanip&g 阅读全文
posted @ 2011-03-18 19:43 AC2012 阅读(173) 评论(0) 推荐(0) 编辑