摘要: 同样是增广路算法,但与最大流dinic算法不同的是: 贪心每次走费用最短路(普通最大流所有边费用都相当于是1,最短路直接bfs就行了) 不能多路増广。 由于是增广路算法,到不能增广时,根据最大流最小割定理,保证当前流是最大流。 代码: (注意:SPFA手写队列要注意大小啊……害得我调了好长时间……干 阅读全文
posted @ 2018-01-23 23:40 秋千旁的蜂蝶~ 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Problem Miracle Corporations has a number of system services running in a distributed computer system which is a prime target for hackers. The system 阅读全文
posted @ 2018-01-23 21:18 秋千旁的蜂蝶~ 阅读(125) 评论(0) 推荐(0) 编辑