LVII OM - I - Problem 4

Participants in a mathematics competition solved six problems, each graded with one of the scores 6, 5, 2, 0. It turned out that
for every pair of participants $ A, B $, there are two problems such that in each of them $ A $ received a different score than $ B $.  
Determine the maximum number of participants for which such a situation is possible.
We will show that the largest number of participants for which such a situation is possible is 1024. We will continue to assume that the permissible ratings are the numbers 0, 1, 2, 3 (instead of 5 points, we give 4, and then divide each rating by 2).
Let $ P = \{0,1,2,3\} $ and consider the set 






Set $ X $ obviously has 4096 elements. We will consider subsets $ A $ of set $ X $ with the following property (*):
(*) If $ (a_1,a_2,\dots,a_6) $, $ (b_1,b_2,\dots,b_6) \in A $, then there exist $i, j$ such that 






It suffices to show that the largest number of elements in set $ A $ with property (*) is 1024.
First, we show that if set $ A $ has property (*), then it has at most 1024 elements. Assume, therefore, that we have a subset $ A $ of set $ X $ with property (*) and suppose that it has at least 1025 elements. Since there are exactly 1024 sequences of length 5 with terms from the four-element set $ P $, it follows from the pigeonhole principle that in set $ A $ there are at least two sequences that have the same terms from the first to the fifth. These sequences differ, therefore, only in one term—the sixth, which contradicts property (*). Therefore, set $ A $ has at most 1024 elements.
Now we show that there exists a set $ A $ with at least 1024 elements and having property (*). It suffices to take the following set: 






First, we show that set $ A $ has at least 1024 elements. Take any numbers $ a_1,a_2,\dots,a_5 \in P $. We can make such a choice in 1024 ways. Let $ r $ be the remainder of the division of the sum $ a_1+a_2+\dots+a_5 $ by 4, and let $ a_6 = 4 - r $. Then, of course, $ (a_1,a_2,\dots,a_6) \in A $, so we have indicated at least 1024 different sequences in set $ A $.
Finally, we show that set $ A $ has property (*). Suppose that 






and sequences $ (a_1,a_2,\dots,a_6) $ and $ (b_1,b_2,\dots,b_6) $ differ in only one term, say the term with index $ k: \; a_k \neq b_k $, where $ 1 \leq k \leq 6 $ and $ a_i = b_i $ for $ i \neq k $. Since the numbers $ a_1 +a_2 +\dots +a_6 $ and $ b_1 +b_2 +\dots+b_6 $ are divisible by 4, their difference is also divisible by 4. But 






Thus, the number $ a_k - b_k $ is divisible by 4. Since $ a_k, b_k \in P $, then 






In the set $ \{-3,-2, -1,0,1,2,3\} $, there is only one number divisible by 4, namely 0. Therefore, $ a_k = b_k $, contrary to the assumption that sequences $ (a_1,a_2,\dots,a_6) $ and $ (b_1,b_2,\dots,b_6) $ differ in the term with index $ k $. This contradiction proves that set $ A $ has property (*), which completes the proof.