Problem

Source: ITAMO 2016, Problem 2

Tags: combinatorics



A mathematical contest had $3$ problems, each of which was given a score between $0$ and $7$ ($0$ and $7$ included). It is known that, for any two contestants, there exists at most one problem in which they have obtained the same score (for example, there are no two contestants whose ordered scores are $7,1,2$ and $7,1,5$, but there might be two contestants whose ordered scores are $7,1,2$ and $7,2,1$). Find the maximum number of contestants.