
图论
图论
xing_mo
这个作者很懒,什么都没留下…
展开
-
Gym 101190D,上下界区间覆盖
Delight for a CatA cat is going on an adventure.Each hour, the cat can be either sleeping or eating. The cat cannot be doing both actions at the samehour, and the cat is doing exactly one of these ...原创 2020-01-15 23:13:45 · 189 阅读 · 0 评论 -
POJ - 1815,动态修改容量最大流,字典序最小割集
FriendshipIn modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only by phone. You can assume that people A can keep in touch with p...原创 2020-01-15 19:37:14 · 348 阅读 · 0 评论 -
POJ - 1815,字典序最小割集
FriendshipIn modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only by phone. You can assume that people A can keep in touch with p...原创 2020-01-15 16:44:41 · 229 阅读 · 0 评论 -
HYSBZ 1061,线性规划转最小费用流
志愿者招募申奥成功后,布布经过不懈努力,终于成为奥组委下属公司人力资源部门的主管。布布刚上任就遇到了一个难题:为即将启动的奥运新项目招募一批短期志愿者。经过估算,这个项目需要N 天才能完成,其中第i 天至少需要Ai 个人。 布布通过了解得知,一共有M 类志愿者可以招募。其中第i 类可以从第Si 天工作到第Ti 天,招募费用是每人Ci 元。新官上任三把火,为了出色地完成自己的工作,布布希望用...原创 2020-01-15 11:34:18 · 386 阅读 · 0 评论 -
UVALive - 3231,二分&最大流
Fair ShareYou are given N processors and M 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 processors...原创 2020-01-14 21:38:00 · 156 阅读 · 0 评论 -
Gym 101981I 最大流
Magic PotionThere are n heroes and m 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 i-th hero ca...原创 2020-01-14 21:30:44 · 214 阅读 · 0 评论 -
HYSBZ 1497 最大权闭合图
最大获利新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共N个可以作为通讯信号中转站的地址,而由于这些地址的地理位置差异,在不同的地方建造通讯中转站需要投入的成本也是不一样的,...原创 2020-01-14 21:17:06 · 136 阅读 · 0 评论 -
POJ 3680 区间k覆盖
IntervalsYou are given N weighted open intervals. The ith interval covers (ai, bi) and weighs wi. Your task is to pick some of the intervals to maximize the total weights under the limit that no poin...原创 2020-01-14 20:39:50 · 158 阅读 · 0 评论 -
二分&01最短路
Telephone Lineshttps://vjudge.net/problem/12427/origin题意:有n个点m条边,每条边为双向且有一个权值,最多可以让k条边的权值变为0,现要最小化从n号点到1号点经过的边权的最大值思路1:首先设经过的边权的最大值为mid,我们二分这个mid值,mid值大时n到1的路径一定包含mid值小的路径,即满足单调性,所以问题转化为是否存在一种方案使得边...原创 2020-01-10 16:19:53 · 615 阅读 · 0 评论 -
分层图最短路
Telephone Lineshttps://vjudge.net/contest/350871#problem/L题意:有n个点m条边,每条边为双向且有一个权值,最多可以让k条边的权值变为0,现要最小化从n号点到1号点经过的边权的最大值思路1:将原图看作k+1层,每层有n个点,dis[u][j]dis[u][j]dis[u][j] 表示到第j层的第u号点的边权最大值,即为当有j条边的权值置...原创 2020-01-10 15:39:45 · 132 阅读 · 0 评论 -
分层图最短路
[SHOI2012]回家的路https://www.luogu.org/problem/P3831题意:轨道交通网络由2n条地铁线路构成,组成了一个n纵n横的交通网。如下图所示,这2n条线路每条线路都包含n个车站,而每个车站都在一组纵横线路的交汇处。只有部分车站可以进行换乘(即改变横纵移动方向),图中用方块标记。从一个车站到另一个车站需要花费2分钟,换乘需要花费1分钟,给你起点和终点,问最少需...原创 2020-01-10 15:19:01 · 176 阅读 · 0 评论 -
Dijkstra算法及证明
Dijkstra算法及证明问题描述有n个点,m条边,求长度为n的数组dis,其中dis[i]表示从源点s到点i的最短距离复杂度O(mlogn)O(mlogn)O(mlogn)算法步骤令dis[s] = 0,其余节点的dis为无穷大,并将节点s入队找出一个未被标记的,dis[x]最小的节点x,然后标记节点x遍历x的所有相邻边(x,y,z),若dis[y] > dis[x] +...原创 2020-01-09 15:00:00 · 1163 阅读 · 0 评论