Editorial for Bubble Cup V9 F Pokermon League challenge
Submitting an official solution before solving the problem yourself is a bannable offence.
The key idea is to first put players into conferences and then assign them to teams. We go through all of the players and put them into conferences so that the first condition is satisfied. We take them one by one and select a conference for each player such that he hates more (or equally many) players in the other conference than the one we put him in. That means that at any point of this process, there will be more hate edges connecting players in different conferences than those connecting players in the same conferences. Thus, in the end, we have satisfied the first condition. Complexity is
Now we will try to satisfy the second condition by assigning teams to the players. Let
Comments