hdu_2444The Accomodation of Students(二分图的判定和计算) 标签:二分图匹配 题目链接 题意: 问学生是否能分成两部分,每一部分的人都不相认识,如果能分成的话,两两认识的人可以去开房哈.求最大的开房数. 题解: 二分染色,黑白染色来看这个图可以被染成一个二分图,如果可以的话求出二分图匹配的个数即可 注意事项: dfs来染色,在求解的时候注意点的编号是从0还是从1开始的 代码: //二分图最好用链表存图 #include<cstdio> #include<…