An $n \times n$ table is filled with real numbers such that the elements decrease monotonically in every row and every column. We want to decide whether a number $a$ is in the table. For this, we can compare $a$ with any element of the table. How many comparisons are needed to solve the problem for sure?
We present an algorithm that definitely decides the question with $2 n-1$ comparisons, and we also show a filling where $2 n-2$ comparisons are definitely not enough.

Compare the number $a$ with the element in the upper right corner of the table. If this element is exactly $a$, then the question is already decided. If the element is larger than $a$, then by monotonicity, every element in the first row is larger than $a$; if the element in the upper right corner is smaller than $a$, then every element in the last column is smaller than $a$. Leave out the first row in the former case, and the last column in the latter case (where $a$ definitely does not appear), and examine the remaining table. By repeating this procedure, that is, by always comparing $a$ with the last element of the first row of the remaining table, we will either find $a$ in the table or eliminate all columns or all rows in at most $2 n-1$ steps. This method, therefore, definitely leads to the goal in at most $2 n-1$ steps.

Now, fill the table as follows: write 3 in every cell along the diagonal connecting the bottom left and the top right corners, and 1 in the cells immediately below these. Write 4 in all cells above the diagonal, and 0 in the remaining cells. Finally, choose $a$ to be 2.

| 4 | 4 | 4 | $\ldots$ | 4 | 3 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 4 | 4 | 4 | $\ldots$ | 3 | 1 |
| 4 | 4 | 3 | $\ldots$ | 1 | 0 |
| $\vdots$ | $\vdots$ | $\vdots$ |  | $\vdots$ | $\vdots$ |
| 4 | 3 | 1 | $\ldots$ | 0 | 0 |
| 3 | 1 | 0 | $\ldots$ | 0 | 0 |

Suppose someone compared the number $a=2$ with $2 n-2$ elements of the table. Among the total $2 n-1$ 3s and 1s, there is at least one that was not compared with 2.

If this element were chosen as 2, then the result of the comparisons would have been the same. Therefore, from the $2 n-2$ comparisons, it cannot be definitively concluded that 2 is not in the table.