18 teams scored 1165 points on this task, for a maximum score of 100, an average score of 65 and a median score of 60.
You live in the country of Fuocus, and you recently watched a documentary about the devastating effects of fires. So now you are wondering what will happen if a fire starts in your country. The country is made up of N cities, numbered from 0 to N-1, connected by N-1 bidirectional roads. It is possible to travel from any city to any other city by following a sequence of roads, since trading between cities is an important part of the economy. Unfortunately the roads are made of wood and they are therefore extremely flammable. In case of a fire in a city, the fire will spread to all the cities connected to it by a road. The fire will then spread to all the cities not already on fire connected to those cities by a road, and so on. There is a firestation in each city, and as soon as the fire reaches a city, the firefighters are able to destroy at most one of the roads connected to that city, preventing the fire from spreading further using that road...