摘要: 求二分图的最大匹配数的算法 二分图:在一个图中,如果可以把这个图中的点集分成两部分,而边集中的每条边连接的两个顶点必须分别是这两部分点集中的一个点。 如 匹配:给定一个二分图G,在G的一个子图M中,M的边集{E}中的任意两条边都不依附于同一个顶点,则称M是一个匹配。 如 1求最大匹配,就是让相连的边 阅读全文
posted @ 2018-08-11 10:27 一无所知小白龙 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 来源poj1068 In the second year of the university somebody started a study on the romantic relations between the students. The relation "romantically inv 阅读全文
posted @ 2018-08-11 10:00 一无所知小白龙 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 来源poj1422 Consider a town where all the streets are one way and each street leads from one intersection to another. It is also known that starting fro 阅读全文
posted @ 2018-08-11 09:57 一无所知小白龙 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 来源poj2226 Rain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 include include include include include include include def 阅读全文
posted @ 2018-08-11 09:53 一无所知小白龙 阅读(348) 评论(0) 推荐(2) 编辑
摘要: Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 include include include include include inc 阅读全文
posted @ 2018-08-11 09:48 一无所知小白龙 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible 阅读全文
posted @ 2018-08-11 09:24 一无所知小白龙 阅读(200) 评论(0) 推荐(0) 编辑