2015年10月16日

【HDOJ】3277 Marriage Match III

摘要: Dinic不同实现的效率果然不同啊。 1 /* 3277 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include ... 阅读全文

posted @ 2015-10-16 21:37 Bombe 阅读(148) 评论(0) 推荐(0) 编辑

【HDOJ】2732 Leapin' Lizards

摘要: 贪心+网络流。对于每个结点,构建入点和出点。对于每一个lizard>0,构建边s->in position of lizard, 容量为1.对于pillar>0, 构建边in position of pillar -> out position of pillar, 容量为number of pil... 阅读全文

posted @ 2015-10-16 17:08 Bombe 阅读(192) 评论(0) 推荐(0) 编辑

【HDOJ】3416 Marriage Match IV

摘要: 先求SPSS。然后遍历每条边,检查是否为最短路径的边,如果是(dis[v]==dis[u]+w)则加入到网络流中。最后Dinic最大流. 1 /* 3416 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7... 阅读全文

posted @ 2015-10-16 15:37 Bombe 阅读(201) 评论(0) 推荐(0) 编辑

导航