题目链接:http://poj.org/problem?id=1469
题意:最大匹配学生与课程数。
解法:ans == 学生数量 YES else NO
代码:#include
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2015-06-14 16:43:10
阅读次数:
111
There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs...
分类:
其他好文 时间:
2015-06-12 09:52:41
阅读次数:
125
here are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to first...
分类:
其他好文 时间:
2015-06-12 09:49:39
阅读次数:
116
原文链接http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-1/...
分类:
其他好文 时间:
2015-06-09 21:46:47
阅读次数:
98
There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to...
分类:
编程语言 时间:
2015-06-09 21:28:54
阅读次数:
110
POJ 1469 COURSES (二分图最大匹配 匈牙利算法)...
分类:
编程语言 时间:
2015-06-09 06:15:57
阅读次数:
106
There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs...
分类:
其他好文 时间:
2015-06-07 21:33:49
阅读次数:
105
There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to...
分类:
编程语言 时间:
2015-06-07 21:21:36
阅读次数:
272
题目描述
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who...
分类:
其他好文 时间:
2015-06-05 10:22:35
阅读次数:
122
题意:p门课,每门课有若干学生,要为每门课分配一名课代表,每个学生只能担任一门课的课代表,若每个课都能找到课代表,则输出"YES",否则"NO"。
分析:二分图的最大匹配,对课程、学生关系建立一个图,进行二分图最大匹配,当最大匹配数==课程数时说明能够满足要求,否则不能。
#include
using namespace std;
#define N 303
bool cs[N][N];...
分类:
其他好文 时间:
2015-06-04 13:49:58
阅读次数:
169