随笔分类 - 网络流
摘要:"Oh, There is a bipartite graph.""Make it Fantastic." X wants to check whether a bipartite graph is a fantastic graph. He has two fantastic numbers, a
阅读全文
摘要:题目描述这是一道模板题。n n n 个点,m m m 条边,每条边 e e e 有一个流量下界 lower(e) \text{lower}(e) lower(e) 和流量上界 upper(e) \text{upper}(e) upper(e),给定源点 s s s 与汇点 t t t,求源点到汇点的
阅读全文
摘要:推荐论文 - http://www.docin.com/p-729740893.html 一 . 无源汇上下界网络流 因此,对于一条边u->v,我们在新图中连三条边: u->v cap=up−dow S->v cap=down u->T cap=down 然后对这个图求最大流即可 因为是无源汇图,因
阅读全文
摘要:题目描述 这是一道模板题。 n n n 个点,m m m 条边,每条边 e e e 有一个流量下界 lower(e) \text{lower}(e) lower(e) 和流量上界 upper(e) \text{upper}(e) upper(e),求一种可行方案使得在所有点满足流量平衡条件的前提下,
阅读全文
摘要:Mirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because he doesn't have the keys. Customers come to
阅读全文
摘要:FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs
阅读全文
摘要:现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路 1:(x,y)<==>(x+1,y)
阅读全文
摘要:题目描述: 恬恬的生日临近了。宇扬给她准备了一个大 蛋糕。 正如往常一样,宇扬在蛋糕上插了nnn支蜡烛,并把蛋糕分为mmm个区域。因为某种原因,他必须把第iii根蜡烛插在第aia\_iai个区域或第bib\_ibi个区域。区域之间是不相交的。宇扬在一个区域内同时摆放xxx支蜡烛就要花费x2x^2
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/143/E来源:牛客网 题目描述 Nowcoder University has 4n students and n dormitories ( Four students per dormitory). Student
阅读全文
摘要:一次舞会有n个男孩和n个女孩。每首曲子开始时,所有男孩和女孩恰好配成n对跳交谊舞。每个男孩都不会和同一个女孩跳两首(或更多)舞曲。有一些男孩女孩相互喜欢,而其他相互不喜欢(不会“单向喜欢”)。每个男孩最多只愿意和k个不喜欢的女孩跳舞,而每个女孩也最多只愿意和k个不喜欢的男孩跳舞。给出每对男孩女孩是否
阅读全文
摘要:Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhi
阅读全文
摘要:B站的视频 : https://www.bilibili.com/video/av21945401?from=search&seid=10743883817588700643 讲的非常的不错,很清楚 推荐博客 : https://blog.csdn.net/LiRewriter/article/de
阅读全文