
二分图最大匹配
文章平均质量分 59
turbo_7
无聊等于慢性自杀
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj1274 The Perfect Stall (匈牙利算法)
匈牙利算法模板题目 大牛的blog http://www.byvoid.com/blog/hungary/ #include #include #include using namespace std; bool a[205][205]; int mat[205]; bool used[205]; int n,m; bool crosspath(int k){ int i; for(原创 2013-05-22 18:47:23 · 578 阅读 · 0 评论 -
poj1325 Machine Schedule
这题算是歪打正着,由于我的for循环都是从1开始,所以很巧合的把在0模式的job都给排除了,交完之后看了下discuss才发现这个问题,for循环从0开始的话需要讨论一下 for(int i=0;i<k;i++) { scanf("%d%d%d",&cur,&ja,&jb); if(ja*jb!=0) a[ja][jb]=1; } 我的AC代码 #include原创 2013-05-22 20:47:28 · 448 阅读 · 0 评论 -
poj1469 COURSES
#include #include #include using namespace std; bool a[105][305]; bool used[305]; int mat[305]; int p,n; bool crosspath(int k){ int i; for(i=1;i<=n;i++) if(a[k][i]==1&&used[i]==0){ used[i]=1;原创 2013-05-23 20:33:40 · 469 阅读 · 0 评论 -
poj3041 Asteroids
#include #include #include using namespace std; bool a[505][505]; bool used[505]; int mat[505]; int n; bool crosspath(int k){ int i; for(i=1;i<=n;i++) if(a[k][i]==1&&used[i]==0){ used[i]=1;原创 2013-05-23 20:49:42 · 581 阅读 · 0 评论