先最大流跑一遍 在残存网络上把满流边容量+1 非满流边容量设为无穷大 在进行一次最大流即可 (这里的边都不包括建图时用于反悔的反向边) ...
分类:
其他好文 时间:
2017-10-01 23:44:32
阅读次数:
237
题目链接:HDU6214 留一个链式前向星+Dinic模板(希望不要被某人发现,嘿嘿嘿)。 ...
分类:
其他好文 时间:
2017-09-26 19:43:33
阅读次数:
181
#include <iostream>#include <string>#include <list> //we use the list container , because it is easy to sort and get the biggest number and smallest n ...
分类:
其他好文 时间:
2017-09-22 19:13:30
阅读次数:
122
#include <iostream>#include <string>using namespace std; void deleteDigite(int k, string str){ int len = str.length(); for(int i=0; i<k; i++) //there ...
分类:
其他好文 时间:
2017-09-21 16:39:32
阅读次数:
97
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6214 题意:求边数最小的割。 解法: 建边的时候每条边权 w = w * (E + 1) + 1; 这样得到最大流 maxflow / (E + 1) ,最少割边数 maxflow % (E + 1) ...
分类:
其他好文 时间:
2017-09-18 20:37:44
阅读次数:
245
hdu 6214 Smallest Minimum Cut[最大流] 题意:求最小割中最少的边数。 题解:对边权乘个比边大点的数比如300,再加1 ,最后,最大流对300取余就是边数啦。。 1 #include<iostream> 2 #include<cstdio> 3 #include<cstr ...
分类:
其他好文 时间:
2017-09-17 20:07:48
阅读次数:
209
1.Mah.ceil() * Returns the smallest (closest to negative infinity) * {@code double} value that is greater than or equal to the * argument and is equal ...
分类:
编程语言 时间:
2017-09-04 11:55:23
阅读次数:
145
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For e ...
分类:
其他好文 时间:
2017-09-03 21:04:53
阅读次数:
162
找出能被两个给定参数和它们之间的连续数字整除的最小公倍数。 范围是两个数字构成的数组,两个数字不一定按数字顺序排序。 例如对 1 和 3 —— 找出能被 1 和 3 和它们之间所有数字整除的最小公倍数。 如果你被卡住了,记得开大招 Read-Search-Ask 。尝试与他人结伴编程、编写你自己的代 ...
分类:
其他好文 时间:
2017-09-02 15:37:30
阅读次数:
126
题目: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: T ...
分类:
其他好文 时间:
2017-08-24 10:43:09
阅读次数:
168