Approach hintTry it first, then revealHide
Only the number of distinct values matters. Each operation removes exactly two elements, so consider the parity of the surplus n - distinct and whether one distinct value must also go.
Only the number of distinct values matters. Each operation removes exactly two elements, so consider the parity of the surplus n - distinct and whether one distinct value must also go.