![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论——网络流
文章平均质量分 80
onepointo
欲言又止
展开
-
2017.7.11 机房测试(图论,网络流,最短路)
感觉今天的考试敲得又多,又难想。。。。 【解题报告】 大概思路就是我们先过一遍SPFA,然后根据dis[]来dfs确定网络流的边。 正确性(可能)显然。代码如下:#include<cstdio>#include<cstring>#include<algorithm>#include<queue>using namespace std;#define N 405#define M 1原创 2017-07-11 21:18:34 · 287 阅读 · 0 评论 -
CodeVS 1907 网络流最小割 解题报告
codevs1907 方格取数 3原创 2017-05-30 11:05:02 · 230 阅读 · 0 评论 -
BZOJ 1822 计算几何+网络流+二分答案 解题报告
1822: [JSOI2010]Frozen Nova 冷冻波DescriptionWJJ喜欢“魔兽争霸”这个游戏。在游戏中,巫妖是一种强大的英雄,它的技能Frozen Nova每次可以杀死一个小精灵。我们认为,巫妖和小精灵都可以看成是平面上的点。 当巫妖和小精灵之间的直线距离不超过R,且巫妖看到小精灵的视线没有被树木阻挡(也就是说,巫妖和小精灵的连线与任何树木都没有公共点)的话,巫妖就可以瞬间杀灭原创 2017-07-12 14:28:44 · 371 阅读 · 0 评论 -
POJ 1637 网络流判混合欧拉回路 解题报告
Sightseeing tourDescriptionThe city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the原创 2017-08-13 17:18:32 · 480 阅读 · 0 评论 -
BZOJ 1001 网络流最小割 解题报告
001: [BeiJing2006]狼抓兔子Description现在小朋友们最喜欢的”喜羊羊与灰太狼”,话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路 1:(x,y)<==>(x+1,y) 2:(x,y)<=原创 2017-08-25 17:27:05 · 274 阅读 · 0 评论 -
HOJ 2634 网络流最小割 解题报告
2634 - How to earn moreProblem DescriptionXiao Ming is an expert in computer science and technology, so he can get a lot of projects every month. The projects always bring him a lot of money, now he is原创 2017-06-10 10:32:06 · 350 阅读 · 0 评论 -
BZOJ 2007 对偶图 解题报告
2007: [Noi2010]海拔DescriptionYT市是一个规划良好的城市,城市被东西向和南北向的主干道划分为n×n个区域。简单起见,可以将YT市看作一个正方形,每一个区域也可看作一个正方形。从而,YT城市中包括(n+1)×(n+1)个交叉路口和2n×(n+1)条双向道路(简称道路),每条双向道路连接主干道上两个相邻的交叉路口。下图为一张YT市的地图(n = 2),城市被划分为2×2个区域,原创 2017-09-13 16:18:11 · 245 阅读 · 0 评论 -
BZOJ 1475 最小割 解题报告
1475: 方格取数Description在一个n*n的方格里,每个格子里都有一个正整数。从中取出若干数,使得任意两个取出的数所在格子没有公共边,且取出的数的总和尽量大。Input第一行一个数n;(n<=30) 接下来n行每行n个数描述一个方阵Output仅一个数,即最大和Sample Input2 1 2 3 5Sample Output6【解题报告】代码如下:/***************原创 2017-10-10 18:34:37 · 199 阅读 · 0 评论 -
SPOJ IM 962 网络流最大流 解题报告
M - Intergalactic MapMap Jedi knights, Qui-Gon Jinn and his young apprentice Obi-Wan Kenobi, are entrusted by Queen Padmé Amidala to save Naboo from an invasion by the Trade Federation. They must leave原创 2017-10-11 14:24:24 · 307 阅读 · 0 评论 -
Codeforces 808F 网络流最小割(二分图最大点权独立集) 解题报告
F. Card GameVova has n cards in his collection. Each of these cards is characterised by its power pi, magic number ci and level li. Vova wants to build a deck with total power not less than k, but magi原创 2017-10-11 15:36:23 · 441 阅读 · 0 评论 -
POJ 1273 网络流最大流 题解
POJ1273原创 2017-04-01 15:35:18 · 703 阅读 · 0 评论 -
BZOJ 4443(SCOI2015)网络流+二分答案 解题报告
bzoj4443 [Scoi2015]原创 2017-05-30 10:35:22 · 363 阅读 · 0 评论 -
BZOJ 3894 网络流最小割 解题报告
bzoj3894原创 2017-05-30 16:51:52 · 530 阅读 · 0 评论 -
BZOJ 3144 网络流最小割 解题报告
3144: [Hnoi2013]切糕DescriptionInput第一行是三个正整数P,Q,R,表示切糕的长P、 宽Q、高R。第二行有一个非负整数D,表示光滑性要求。接下来是R个P行Q列的矩阵,第z个 矩阵的第x行第y列是v(x,y,z) (1≤x≤P, 1≤y≤Q, 1≤z≤R)。 100%的数据满足P,Q,R≤40,0≤D≤R,且给出的所有的不和谐值不超过1000。Output仅包含一个整原创 2017-06-11 09:02:20 · 270 阅读 · 0 评论 -
SPOJ 1693 网络流最小割 解题报告
COCONUTS - CoconutsA group of n castle guards are voting to determine whether African swallows can carry coconuts. While each guard has his own personal opinion on the matter, a guard will often vote c原创 2017-06-10 19:49:33 · 334 阅读 · 0 评论 -
URAL 1277 网络流最小割 解题报告
1277. Cops and ThievesProblem DescriptionThe Galaxy Police (Galaxpol) found out that a notorious gang of thieves has plans for stealing an extremely valuable exhibit from the Earth Planetary Museum — a原创 2017-06-10 16:57:47 · 267 阅读 · 0 评论 -
SPOJ 287 网络流最大流+二分答案 解题报告
NETADMIN - Smart Network AdministratorThe citizens of a small village are tired of being the only inhabitants around without a connection to the Internet. After nominating the future network administra原创 2017-06-10 09:06:27 · 371 阅读 · 0 评论 -
POJ 3281 网络流最大流 解题报告
DiningDescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabulous meals for his cows, but he forgot原创 2017-06-09 20:07:26 · 404 阅读 · 0 评论 -
ZOJ 3348 网络流最大流 解题报告
ScheduleTime Limit: 1 Second Memory Limit: 32768 KB DD enters the top-level pingpong match! As the game going on, he wonders if there is possibility for him to get the champion(excluding joint ch原创 2017-06-09 08:27:24 · 651 阅读 · 0 评论 -
POJ 1149 网络流最大流 解题报告
PIGSDescriptionMirko 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 the farm one after another. Each of原创 2017-06-09 11:55:40 · 249 阅读 · 0 评论 -
HDU 3572 网络流最大流 解题报告
hdu3572原创 2017-06-07 20:56:48 · 304 阅读 · 0 评论 -
留着以后慢慢做的网络流(题表)
网络流转载 2017-05-30 19:39:44 · 378 阅读 · 0 评论 -
BZOJ 3993 [SDOI 2015] 网络流+二分答案 解题报告
3993: [SDOI2015]星际战争Description3333年,在银河系的某星球上,X军团和Y军团正在激烈地作战。在战斗的某一阶段,Y军团一共派遣了N个巨型机器人进攻X军团的阵地,其中第i个巨型机器人的装甲值为Ai。当一个巨型机器人的装甲值减少到0或者以下时,这个巨型机器人就被摧毁了。X军团有M个激光武器,其中第i个激光武器每秒可以削减一个巨型机器人Bi的装甲值。激光武器的攻击是连续的。这原创 2017-10-22 21:47:51 · 255 阅读 · 0 评论