Problem

Source: All-Russian MO 2024 9.8

Tags: combinatorics, combinatorics proposed



$1000$ children, no two of the same height, lined up. Let us call a pair of different children $(a,b)$ good if between them there is no child whose height is greater than the height of one of $a$ and $b$, but less than the height of the other. What is the greatest number of good pairs that could be formed? (Here, $(a,b)$ and $(b,a)$ are considered the same pair.) Proposed by I. Bogdanov