
【网络流】
Kuguotao
这个作者很懒,什么都没留下…
展开
-
最大流模板()
#include <iostream>#include <string.h>#include <stdio.h>#include <algorithm>#include <queue>#define inf 0x3f3f3f3fusing namespace std;const int N=6e4+5;struct no...原创 2019-10-07 09:42:23 · 277 阅读 · 0 评论 -
hdu-6582 Path(最短路+dinic)
链接;http://acm.hdu.edu.cn/showproblem.php?pid=6582题意:给你一个图,要求你减去一些边使得1至n的最短路径变长。并且使得花费最小,删边花费为其长度。思路:先求出最短路,将所有的最短路的边新建一个图,跑一个最大流就可以了。#include <cstdio>#include <queue>#include <...原创 2019-08-08 10:27:52 · 330 阅读 · 1 评论 -
D - Going Home 最小费用最大流
On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need t...原创 2018-11-05 20:57:05 · 190 阅读 · 0 评论 -
E - Minimum Cost 最小费用最大流
Dearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which stocks goods from him.Dearboy has M supply places (m...原创 2018-11-05 21:16:23 · 259 阅读 · 0 评论 -
网络流dinic最大流 Drainage Ditches
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 awhile and takes quite a long time to regrow. Thus, Fa...原创 2018-10-25 16:44:39 · 156 阅读 · 0 评论 -
HDU 4292 - Food 网络流dinic
You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible. The issue comes up as people in your college are more a...原创 2018-10-25 21:15:32 · 180 阅读 · 0 评论 -
M - Escape dinic 最大流 二分图多重匹配
2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now scientists wa...原创 2018-10-31 19:48:13 · 240 阅读 · 0 评论 -
F - Power Network dinic(最大流)
n个点,np个供电站,nc个消费站,剩下的(n-np-nc)个都是中转站,m条线路问你最大可接受供电是多少,Dinic直接上只有供电站可以和源点连边,只有消费站可以跟汇点连边#include<stdio.h>#include<string.h>#include<iostream>#include<queue>#include&l...原创 2018-10-30 20:24:12 · 178 阅读 · 0 评论 -
C - A Plug for UNIX 最大流 dinic
You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and id...原创 2018-11-01 17:37:20 · 174 阅读 · 0 评论