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?

Your answer seems reasonable.
Find out if you're right!