6. Three boys and 20 girls stood in a row. Each child counted the number of girls who were to the left of them, the number of boys who were to the right of them, and added the results. What is the maximum number of different sums that the children could have obtained? (Provide an example of how such a number could be obtained and prove that a greater number of different sums is not possible.)
Solution. Let's consider how the number changes when moving from left to right by one person. If the adjacent children are of different genders, the number does not change. If we move from a girl to a girl, the number increases by 1, and if from a boy to a boy, it decreases by 1. Thus, the smallest number in the row could have increased by no more than 19, which means there are no more than 20 different numbers. Let's provide an example with 20 different numbers: place all the boys first, then all the girls in sequence from left to right. Then the numbers in the row will be: 2, $1,0,0,1,2, \ldots, 19$, a total of 20 different numbers.

Answer. 20.

Grading Recommendations. Only the correct answer - 0 points. Correct example with the correct answer - 2 points (a). Verification that with this arrangement, indeed 20 different numbers are obtained - 1 point (b). Estimation that more than 20 different numbers cannot exist - 4 points (c). Points for items a, b, c are cumulative.