# Array of integers

A $$1000\times1000$$ array is to be filled with integers between 1 and 1000 inclusive, with each integer appearing 1000 times. What is the maximum value of $$n$$ such that there necessarily exists a row or column with at least $$n$$ distinct integers?

×