
最小割
coldfresh
那我们开始吧
展开
-
方格取数(2) HDU - 1569(二分图最大点权独立集)
给你一个m*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取数所在的2个格子不能相邻,并且取出的数的和最大。 Input 包括多个测试实例,每个测试实例包括2整数m,n和m*n个非负数(m<=50,n<=50) Output 对于每个测试实例,输出可能取得的最大的和 Sample Input 3 3 75 15 21原创 2017-11-08 22:51:21 · 470 阅读 · 0 评论 -
Game HDU - 3657(还是算最小割吧)
onmylove has invented a game on n × m grids. There is one positive integer on each grid. Now you can take the numbers from the grids to make your final score as high as possible. The way to get score i原创 2017-11-08 23:56:19 · 363 阅读 · 0 评论 -
Being a Hero HDU - 3251 (最小割)
You are the hero who saved your country. As promised, the king will give you some cities of the country, and you can choose which ones to own! But don’t get too excited. The cities you take should NOT原创 2017-11-10 01:01:09 · 359 阅读 · 0 评论 -
网络流二·最大流最小割定理 HihoCoder - 1378
传送门问题关键是求是点的最小割级点,实质上个只要在增广完毕后的参量网络中,从源点出发做一次bfs即可,即可把所有的割点找出#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<queue> #define INF 0x3f3f3f3f using namespace std; const int原创 2017-11-03 14:33:37 · 348 阅读 · 0 评论 -
Base Station HDU - 3879(最大权闭合子图)
A famous mobile communication company is planning to build a new set of base stations. According to the previous investigation, n places are chosen as the possible new locations to build those new stat原创 2017-11-06 15:08:06 · 324 阅读 · 0 评论 -
Battle HDU - 3061(最大权闭合子图)
由于小白同学近期习武十分刻苦,很快被晋升为天策军的统帅。而他上任的第一天,就面对了一场极其困难的战斗: 据侦查兵回报,前方共有N座城池,考虑到地势原因,最终得到一个结论:攻占某些城池之前必须攻占另外一些城池。 事实上,可以把地图看做是一张拓扑图,而攻占某个城池,就意味着必须先攻占它的所有前驱结点。 小白还做了一份调查,得到了攻占每个城池会对他的兵力产生多少消耗(当然也可能会得到增长,因为原创 2017-11-06 15:24:09 · 308 阅读 · 0 评论