Editorial for Mock CCC '22 Contest 2 J4 - Hockey Bracket
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
For each country, we can store their group, their score, and their country number.
Then we can iterate through the games and update the countries' scores.
We can then sort the countries by group, breaking ties by score, and breaking further ties by country number.
Finally, we can iterate through the countries and output them.
Time Complexity:
Comments