symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2014年3月18日

摘要: 1 #include 2 #include 3 #define black 1 4 #define white -1 5 int already[201]; 6 int in[201]; 7 int gr[201][201]; 8 int n; 9 int v[201];10 int pf,pe;11 12 int dfs(int a,int color){13 v[a]=color;14 int i;15 int sign;16 for(i=1;i<=n;++i){17 if(i==a) continue;18 if(... 阅读全文
posted @ 2014-03-18 17:24 symons 阅读(264) 评论(0) 推荐(0)

摘要: [Reprinted ]最小点覆盖=最大二分匹配数url: http://zhidao.baidu.com/link?url=ZMzk27V8P99KQN63DpVsE2fd1YBIk7Jg83E4iHAW-OI1eU9E9FlT9knnZNqSAJk65mv894xLjd3qYSyLSvlwcK比如最大匹配是M。为了求最少的点让每条边都至少和期中一个点关联。M个点是足够的。就是说他们覆盖最大匹配的那M条边后,假设有某边e没被覆盖,那么把e加入后会得到一个更大的匹配,出现矛盾。M个点是必需的。匹配的M条边,由于他们两两无公共点,就是说至少有M个点才能把他们覆盖。warnning:::: At 阅读全文
posted @ 2014-03-18 15:56 symons 阅读(171) 评论(0) 推荐(0)

摘要: define n the number of ' * 'define d the number of couple of two pointsdefine s the single point that can't link to others ( means no points around it in 4 directions )n = 2 * d + s ;d + s = n - duse Hungary finding out the d 1 #include 2 #include 3 char gird[50][25]; 4 int number[50][25 阅读全文
posted @ 2014-03-18 14:54 symons 阅读(157) 评论(0) 推荐(0)