Girls and BoysTime limit:20000/10000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total Submission (s): 8104 Accepted Submission (s): 3711
Problem DescriptionThe Second year of the University somebody started a study on the romantic relations between the Studen Ts. The relation "romantically involved" is defined between one girl and one boy. For the study reasons it was necessary to find out the the maximum set satisfying the condition:there was no and the students in T He set who has been "romantically involved". The result of the program was the number of students in such a set.
The input contains several data sets in text format. Each data set represents one set of subjects of the study, with the following description:
The number of students
The description of each student, in the following format
Student_identifier: (number_of_romantic_relations) student_identifier1 student_identifier2 student_identifier3 ...
Or
Student_identifier: (0)
The Student_identifier is a integer number between 0 and n-1, for n subjects.
For each given data set, the program should write to standard output a line containing the result.
Sample Input
70: (3) 4 5 61: (2) 4 62: (0) 3: (0) 4: (2) 0 15: (1) 06: (2) 0 130: (2) 1 21: (1) 02: (1) 0
Sample Output
52
Sourcesoutheastern Europe 2000
Test instructions is not too clear on personal view, no longer narrate test instructions. Investigation of knowledge points: the maximum independent set of two graphs = vertex number-The maximum number of matches. But some of the questions are unclear ... As follows:
Hungarian algorithm Template HDU 1068 test instructions .... (The data range is too arbitrary.) )