Problem

Source: Mexico National Olympiad 2019 P4

Tags: combinatorics



A list of positive integers is called good if the maximum element of the list appears exactly once. A sublist is a list formed by one or more consecutive elements of a list. For example, the list $10,34,34,22,30,22$ the sublist $22,30,22$ is good and $10,34,34,22$ is not. A list is very good if all its sublists are good. Find the minimum value of $k$ such that there exists a very good list of length $2019$ with $k$ different values on it.