2017年7月16日

UVA1349 Optimal Bus Route Design 拆点法+最小费用最佳匹配

摘要: /** 题目:UVA1349 Optimal Bus Route Design 链接:https://vjudge.net/problem/UVA-1349 题意:lrj入门经典P375 给n个点(nv有向边。 左边一侧全是u,右边一侧全是v。 u与若干个v有指向关系u->v。 每一个点都扮演着u,v的指向位置关系。指向别的点,被别的点指向,都是唯一性。 对每一个点拆分成两个点,前者指向... 阅读全文

posted @ 2017-07-16 17:40 hnust_accqx 阅读(168) 评论(0) 推荐(0)

UVA1658 Admiral 拆点法解决结点容量(路径不能有公共点,容量为1的时候) 最小费用最大流

摘要: /** 题目:UVA1658 Admiral 链接:https://vjudge.net/problem/UVA-1658 题意:lrj入门经典P375 求从s到t的两条不相交(除了s和t外,没有公共点)的路径,使得权值和最小。 思路:拆点法。 除了s,t外。把其他点都拆成两个。 例如点A,拆成A和A'。A指向A'连一条容量为1,花费为0的边。 原来指向A的,仍然指向A点。 原来A指向其... 阅读全文

posted @ 2017-07-16 13:57 hnust_accqx 阅读(200) 评论(0) 推荐(0)

UVA11082 Matrix Decompressing 最大流建模解矩阵,经典

摘要: /** 题目:UVA11082 Matrix Decompressing 链接:https://vjudge.net/problem/UVA-11082 题意:lrj入门经典P374 已知一个矩阵的行数为r,列数为c,前i行的和ai(1 #include #include #include #include #include #include using namespace std; con... 阅读全文

posted @ 2017-07-16 11:21 hnust_accqx 阅读(222) 评论(0) 推荐(0)

uva753 A Plug for UNIX 网络流最大流

摘要: C - A Plug for UNIX You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which ha 阅读全文

posted @ 2017-07-16 09:55 hnust_accqx 阅读(518) 评论(0) 推荐(0)

导航