
网络流
文章平均质量分 78
Mr_Treeeee
这个作者很懒,什么都没留下…
展开
-
HDU 3416 Marriage Match IV (SPFA+Dinic)
Marriage Match IVTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4279 Accepted Submission(s): 1280Problem DescriptionDo not s原创 2017-08-16 19:27:57 · 335 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第五场) - E room (二分图匹配 费用流)
https://www.nowcoder.com/acm/contest/143/E题意:给你n个寝室。每个寝室有4个人。给你第一年的n个寝室的人员分配。再给你第二年的n个寝室的人员分配。问你最少要让几个人换寝室。不是次数,是人数。 POINT:把新旧寝室分成二分图。旧寝室到新寝室要搬走的人数很好处理。这样就是n*n条边的二分图,有权值。 这样就是二分图最小权值匹配...原创 2018-08-03 22:00:34 · 254 阅读 · 0 评论 -
第十四届浙江财经大学程序设计竞赛 - C Collect Jewel && G- Get the Highest Score
C Collect Jewel :题目题解#include <iostream>#include <stdio.h>#include <math.h>#include <string.h>#include <algorithm>#include <queue>#include <vector>usi原创 2018-04-02 21:08:54 · 390 阅读 · 0 评论 -
ZOJ Monthly, January 2018 - D Seat Assignment (最大流)
HintThe first sample:There are 10 seats numbered from 1 to 10.There are 2 people wanting their seat number to be a multiple of 1, 1 person wanting his seat number to be a multiple of 2, and 4原创 2018-01-25 17:54:25 · 585 阅读 · 0 评论 -
POJ 3281 Dining(网络流建模)
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19277 Accepted: 8599DescriptionCows are such finicky eaters. Each cow has a preference for certa原创 2017-09-01 18:48:31 · 320 阅读 · 0 评论 -
HDU 3605 Escape(多重匹配||状压缩点的网络流)
EscapeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 11151 Accepted Submission(s): 2676Problem Description2012 If this is th原创 2017-09-07 22:03:42 · 445 阅读 · 0 评论 -
HDU 4289 Control (拆点+网络流)
ControlTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3618 Accepted Submission(s): 1522Problem Description You, the head of原创 2017-09-07 21:59:05 · 369 阅读 · 0 评论 -
POJ 3692 Kindergarten (补图的最大独立集||匈牙利算法)
KindergartenTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7291 Accepted: 3590DescriptionIn a kindergarten, there are a lot of kids. All girls of the原创 2017-08-29 22:09:16 · 431 阅读 · 0 评论 -
HDU 1569 方格取数(2) (二分图的最大点权独立集)
方格取数(2)Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6704 Accepted Submission(s): 2152Problem Description给你一个m*n的格子的棋盘,每个格原创 2017-08-29 14:29:34 · 426 阅读 · 0 评论 -
POJ 3469 Dual Core CPU (最小割)
Dual Core CPUTime Limit: 15000MS Memory Limit: 131072KTotal Submissions: 25064 Accepted: 10860Case Time Limit: 5000MSDescriptionAs more and more computers原创 2017-08-28 17:04:31 · 557 阅读 · 0 评论 -
POJ 2516 Minimum Cost (最小费用最大流)
Minimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 17300 Accepted: 6086DescriptionDearboy, a goods victualer, now comes to a big problem, and原创 2017-09-05 18:36:47 · 327 阅读 · 0 评论 -
HDU 4280 Island Transport (最大流)
Island TransportTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 9242 Accepted Submission(s): 2986Problem Description In th原创 2017-09-05 18:27:49 · 365 阅读 · 0 评论 -
POJ 2195 Going Home(最小费用最大流)
Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23546 Accepted: 11868DescriptionOn a grid map there are n little men and n houses. In each u原创 2017-09-04 20:39:13 · 377 阅读 · 0 评论 -
HDU 3549 Flow Problem (Ford-Fulkerson&Dinic)
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 16993 Accepted Submission(s): 8005Problem DescriptionNetwork flow原创 2017-08-15 18:37:45 · 289 阅读 · 0 评论 -
牛客国庆集训派对Day6 - A Birthday (网络流 花费和流量有关)
https://www.nowcoder.com/acm/contest/206/APOINT:这题本质上就是一个网络流。但它的边的花费是流量的平方。我们可以对每个点对,增加几条边,花费分别为1,3,5,7,9.容量为1.这样就实现了花费为流量的平方。 #include <bits/stdc++.h>using namespace std;#defin...原创 2018-10-15 17:35:31 · 268 阅读 · 0 评论