8.4. In the country, there are 15 cities, some of which are connected by roads. Each city is assigned a number equal to the number of roads leading out of it. It turned out that there are no roads between cities with the same number. What is the maximum number of roads that can be in the country?
Answer: 85.

Solution: Let's order the city numbers in non-increasing order:

$$
a_{1} \geq a_{2} \geq \cdots \geq a_{15}
$$

Notice that the number of cities with number $15-i$ is no more than $i$. Indeed, if there are at least $i+1$ such cities, then they cannot be connected to each other, and thus can be connected to no more than $15-(i+1)=14-i$ cities, but they should be connected to $15-i$ cities, which is a contradiction.

Therefore, the maximum number is no more than 14, the next two are no more than 13, the next three are no more than 12, the next four are no more than 11, and the remaining five are no more than 10. The total sum of the numbers is no more than $14 + 2 \times 13 + 3 \times 12 + 4 \times 11 + 5 \times 10 = 170$. Since each road contributes to the numbers of exactly two cities, the total number of roads is no more than $170 \div 2 = 85$.

We will show that this can be achieved. Divide the country into 5 regions. In the first region, there is one city, in the second region, there are two, in the third region, there are three, and so on. Let the cities be connected if and only if they lie in different regions. Then the first city is connected to all others (has number 14), the cities in the second region are connected to all except each other (and have number 13), the cities in the third region are connected to $15-3=12$ cities, the cities in the fourth region are connected to $15-4=11$ cities, and the cities in the fifth region are connected to $15-5=10$ cities.

Criteria: evaluation - 4 points, example - 2 points