题目链接 题意 \(n\)人进行\(m\)场比赛,给定\(m\)场比赛的双方编号:再给定已知的为\(good\ player\)的\(x\)个人的编号,已知的为\(bad\ player\)的\(y\)个人的编号.准则是每场比赛的两个选手必定一位来自\(good\ player\),另一位来自\(bad\ player\). 问是否可以据此将所有选手划分成两个阵营. 思路 // 题意和样例都很迷... 总的来说就是二分图染色,已经染好了若干个点,问能否顺利染成一个二分图. 但是不允许有孤立点.…
题意:给定n个人的两两比赛,每个人要么是good 要么是bad,现在问你能不能唯一确定并且是合理的. 析:其实就是一个二分图染色,如果产生矛盾了就是不能,否则就是可以的. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #…
题目链接: hdu 5971 Wrestling Match 题意:N个选手,M场比赛,已知x个好人,y个坏人,问能否将选手划分成好人和坏人两个阵营,保证每场比赛必有一个好人和一个坏人参加. 题解:dfs染色.听说题意模糊?从样例来看,第一个例子应该是因为2可能是好人可能是坏人,所以不确定就NO了... #include <iostream> #include <cstring> #include <cstdio> #include <algorithm>…
http://acm.hdu.edu.cn/showproblem.php?pid=5971 Wrestling Match Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 25    Accepted Submission(s): 15 Problem Description Nowadays, at least one wrestli…
传送门 •题意 给出 n 个人,m 场比赛: 这 m 场比赛,每一场比赛中的对决的两人,一个属于 "good player" 另一个属于 "bad player": 给出你 x 个已经确定的"good player" 和  y 个已经确定的 "bad player". 问是否可以将这 n 个人划分成两类,其中一类属于 "good player",另一类属于 "bad player": 即…
Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, the rest is "bad player”. Now, Xiao Ming is referee of the wrestling match and he has a list of the matches in his…
HDU 3081 Marriage Match II (二分图,并查集) Description Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we are kids. What a happy time as so many…
Wrestling Match Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2097    Accepted Submission(s): 756 Problem Description Nowadays, at least one wrestling match is held every year in our country.…
The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9477    Accepted Submission(s): 4165 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2444 Description: There are a gro…
HDU 3081 Marriage Match II (网络流,最大流,二分,并查集) Description Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we are kids. What a happy time as…