自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

转载 二分图最大匹配总结(转)

二分图匹配(匈牙利算法) 1。一个二分图中的最大匹配数等于这个图中的最小点覆盖数 König定理是一个二分图中很重要的定理,它的意思是,一个二分图中的最大匹配数等于这个图中的最小点覆盖数。如果你还不知道什么是最小点覆盖,我也在这里说一下:假如选了一个点就相当于覆盖了以它为端点的所有边,你需要选择最少的点来覆盖所有的边。   2。最小路径覆盖=最小路径覆盖=|

2015-01-28 22:49:05 297

原创 hdu 2389 Rain on your Parade (二分匹配 Hc 算法)

题目链锁 http://acm.hdu.edu.cn/showproblem.php?pid=2389 先生成最短增广路,在此基础进行增广,复杂度sqrt(n)*e #include #include #include #include #include #include #include #include #include #include #include using namesp

2015-01-26 11:25:49 349

原创 hdu-2819 Swap (二分匹配)

题目链锁:http://acm.hdu.edu.cn/showproblem.php?pid=2819 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define inf 0x3f3f3

2015-01-25 21:07:54 286

原创 hdu-2444,hdu-1083 (二分匹配)

hdu-1083 题目链锁 :http://acm.hdu.edu.cn/showproblem.php?pid=1083 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define inf

2015-01-25 20:41:14 322

原创 Codeforces Round #287 (Div. 2) D. The Maths Lecture (数位dp)

题意 : 位数为n的数中有几个数的后缀能被k整除 数位dp int n, k; LL m; LL dp[1111][111][2], mul[1111], mulm[1111]; LL dfs ( int cur, int rest, int e ) { //当前位数为cur, 余数为rest, e == 1 表示有前导0 LL &ans = dp[cur][rest][e]

2015-01-24 13:29:05 363

原创 Codeforces Round #287 (Div. 2) A B C

A 题意:Amr有n种乐器,每种乐器需要ai天学完,Amr一共有k天去学,最多能学多少种 水题,排序一下就好了....然后我没看清题意就交了一发..呵呵→_→ struct node { int id , a; bool operator ( const node &ot ) { return a ot.a; } }a[111]; int main () { in

2015-01-24 11:28:08 414

原创 hdu 2255 - 奔小康赚大钱 ( km模板)

题目链锁: http://acm.hdu.edu.cn/showproblem.php?pid=2255 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define inf 0x3f3f3f3f

2015-01-23 21:29:01 377

原创 Codeforces Round #286 (Div. 2) C Mr. Kitayuta, the Treasure Hunter ( DP )

题目链锁: http://codeforces.com/contest/505/problem/C 题意: 有30001个岛,0~30000, 给出n个岛上有宝藏,第一步跳跃距离为d,假设上一步跳跃距离为l,则当前可以跳l-1,l,l+1的距离 dp[i][j]表示在第i个点,上一步的跳跃距离l与第一步的跳跃距离相差为j,即 l = j + d 则  dp[i+l-1][j-1]

2015-01-22 19:46:58 339

原创 poj1681-Painter's-Problem ( 高斯消元)

题目链锁 : http://poj.org/problem?id=1681 #include #include #include #include #include #include #include #include #include #include using namespace std; #define inf 0x3f3f3f3f #define eps

2015-01-22 19:26:00 314

原创 hdu-4818-RP problem(高斯消元)

#include #include #include #include #include #include #include #include #include #include using namespace std; #define inf 0x3f3f3f3f #define eps 1e-9 #define mod 100007 #define FOR(

2015-01-22 11:41:53 1014

原创 LA 4287 Proving Equivalences (强连通)

#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define inf 0x3f3f3f3f #define eps 1e-9 #define mod 100000

2015-01-22 11:00:15 319

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除