算法-网络流
文章平均质量分 92
asdkjc
这个作者很懒,什么都没留下…
展开
-
[POJ 3680]Intervals(费用流)
数轴上有一些带权值的左闭右开区间,选出权和尽量大的一些区间,使得任意一个数最多被k个区间覆盖。 把每个数作为一个结点,然后对于权值为w的区间[u,v)加边u->v,容量为1,费用为-w。再对所有相邻的点加边i->i+1,容量为k,费用为0。最后求最左点到最右点的最小费用最大流即可,其中每个流量对应一组互不相交的区间。 如果数值范围太大,可以先进行离散化。 这样的建图保证了每个数最多经...原创 2020-01-16 15:37:06 · 78 阅读 · 0 评论 -
[UVALive 3231]Fair Share
Description You are given NNN processors and MMM jobs to be processed. Two processors are specified to each job. To process the job, the job should be allocated to and executed on one of the two proce...原创 2020-01-15 16:41:08 · 117 阅读 · 0 评论 -
[CodeForces Gym 101981I]Magic Potion
Description There are nnn heroes and mmm monsters living in an island. The monsters became very vicious these days,so the heroes decided to diminish the monsters in the island. However, the iii-th her...原创 2020-01-15 16:15:40 · 106 阅读 · 0 评论 -
[BZOJ 1497]最大获利(网络流-最大权闭合子图)
Description 新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共N个可以作为通讯信号中转站的地址,而由于这些地址的地理位置差异,在不同的地方建造通讯中转站需要投入的成本...原创 2020-01-15 15:46:05 · 157 阅读 · 0 评论 -
[HDU 2444]The Accomodation of Students
Description There are a group of students. Some of them may know each other, while others don’t. For example, A and B know each other, B and C know each other. But this may not imply that A and C know...原创 2019-07-24 10:36:34 · 92 阅读 · 0 评论