10-7-1. At a large round table, 90 people are feasting, facing the center of the table: 40 barons, 30 counts, and 20 marquises. On a signal, exactly those who have both neighbors—left and right—with the same title should stand up. What is the maximum number of people who can stand up?

For example, for a count to stand up, both of his neighbors must have the same title, but it does not necessarily have to be a count.
Answer: 86.

Solution Variant 1. We ask half of the revelers, standing every other person, to step forward. Then all the people will be divided into two circles: an inner and an outer one. Note that a person in the inner circle has both neighbors in the outer circle, and they are also neighbors there. Similarly for a person in the outer circle.

Thus, we only need to find the maximum number of neighbors of the same title in the two new circles. Since each of the two new circles has 45 people, none of them can consist entirely of nobles of the same title. Therefore, in each circle, there are at least two pairs of neighbors of different titles (there cannot be just one). Thus, in total, there are at least 4 pairs of neighbors of different titles in both circles. Therefore, out of 90 revelers, 4 definitely will not stand.

In the reasoning above, we proved that more than 86 revelers cannot stand. But does a situation exist where exactly 86 stand? Yes, and an example of such a situation can easily be constructed from our reasoning: place 40 barons and 5 counts in a row in the outer circle, and 25 counts and 20 marquises in a row in the inner circle. Then we will have exactly 4 pairs of neighbors of different titles. In general, any example where there are two types of people in each circle, with people of one type in a row and people of the other type also in a row, will work.