codeforces 387D George and Interesting Graph(二分图最大匹配)
题意:
。。。
思路:
interesting graph去掉中心点和与其相连的边之后,成为一个所有点出度和入度都是1的图。
那么,可以用二分图的左半表示出度,右半表示入度。
则这个二分图的最大匹配是max_match。
与中心点相连的边有cnti条,other = m - cnti
则在我们构造的二分图中
需要删去的边:other - max_match
需要添加的边: n
原创
2015-05-15 17:33:48 ·
756 阅读 ·
0 评论