摘要: 匈牙利算法的基本知识:百度百科:http://baike.baidu.com/view/501092.htm维基百科: 这里面有邻接矩阵的模拟图http://en.wikipedia.org/wiki/Hungarian_algorithm二分图定理总结http://www.cnblogs.com/jffifa/archive/2011/12/26/2302480.html题目: 大部分属于模板题,就不贴代码了http://acm.hdu.edu.cn/showproblem.php?pid=2119http://acm.hdu.edu.cn/showproblem.php?pid=1083h 阅读全文
posted @ 2012-03-07 20:11 Szz 阅读(292) 评论(0) 推荐(0)
摘要: poj 3020 Antenna Placement(二分图+最小路径覆盖)?马虎了一下,少些了个=号,错了N 遍http://poj.org/problem?id=3020#include<stdio.h>#include<string.h>#define N 1000int a,h,w;char str[N][N];int map[N][N],vis[N],result[N];int bian(int x,int y){ if(x>=0&&x<=h&&y>=0&&y<=w) { if(str[x 阅读全文
posted @ 2012-03-07 20:09 Szz 阅读(146) 评论(0) 推荐(0)
摘要: 马虎了一下,少些了个=号,错了N 遍http://poj.org/problem?id=3020#include<stdio.h>#include<string.h>#define N 1000int a,h,w;char str[N][N];int map[N][N],vis[N],result[N];int bian(int x,int y){ if(x>=0&&x<=h&&y>=0&&y<=w) { if(str[x][y]=='*') { return x*w+y; } re 阅读全文
posted @ 2012-03-07 20:08 Szz 阅读(137) 评论(0) 推荐(0)