z-birthday-party
As you already know, today is Z's birthday. So he decided to throw a party. During the party Z realized that his friends tend to hang-out in groups. More precisely, Z thinks that he can group his friends into group, so that all the friends from one group had not set at a table with any of the friends outside the group during the party.
Z has recorded all the table configurations during the party. More precisely, when some of his friends sit on a table, Z will record that. It would always happen that some of his friends sit at a table at the same time, and leave (go to dance) at the same time
Z gave you the list of all the table configuration, and asked you to find out how many "isolated" groups of friends are there (as described above)
4
2 aleks boba
2 boba dule
3 pitt angelina jordan
2 jordan divacOutput:
23
3 aleks boba dule
3 pitt angelina divac
2 aleks angelina
13
3 aleks boba dule
3 pitt angelina divac
1 jordan
3Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.