18. (30th Russian Mathematical Olympiad) Find the largest positive integer $N$, such that no matter how the integers from 1 to 400 are placed in a $20 \times 20$ grid, there will always be two numbers in the same row or the same column whose difference is at least $N$.

 untranslated text:
将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。 

translated text:
18. (30th Russian Mathematical Olympiad) Find the largest positive integer $N$, such that no matter how the integers from 1 to 400 are placed in a $20 \times 20$ grid, there will always be two numbers in the same row or the same column whose difference is at least $N$.
18. First, illustrate that $N \leqslant 209$. Use a vertical line in the middle to divide the grid into two $20 \times 10$ grids. Fill the numbers from 1 to 200 into the left grid in increasing order row by row, and fill the numbers from 201 to 400 into the right grid in the same manner. This way, the maximum difference of the numbers in each row does not exceed $210-1=209$; the maximum difference of the numbers in each column does not exceed $191-1=190$. Therefore, $N \leqslant 209$.
Next, prove that $N$ cannot be less than 209. We observe the subsets
$$
M_{1}=\{1,2, \cdots, 91\} \text { and } M_{2}=\{300,301, \cdots, 400\} \text {. }
$$

Color the rows and columns that contain numbers from $M_{1}$ in red; color the rows and columns that contain numbers from $M_{2}$ in blue. We need to prove that the number of red rows and columns is at least 20, and the number of blue rows and columns is at least 21. Then, there must be a row or column that is both red and blue, meaning there are two numbers in it with a difference of at least $300-91=209$.

Suppose there are $i$ rows and $j$ columns colored red. Thus, all elements of $M_{1}$ are located at the intersections of these rows and columns, so $i j \geqslant 91$.
Therefore, $i+j \geqslant 2 \sqrt{i j} \geqslant 2 \sqrt{91}>19$.
Similarly, the sum of the number of blue rows and columns
$$
i^{\prime}+j^{\prime} \geqslant 2 \sqrt{i^{\prime} j} \geqslant 2 \sqrt{101}>20 .
$$