A 5 by 5 Latin Square is a 5 by 5 grid of squares in which each square contains one of the numbers 1 through 5 so that every number appears exactly once in each row and column. A partially completed grid is puzzle-ready if there is a unique way to fill in the remaining squares to complete a Latin Square.
Below is a partially completed grid with seven squares filled in and an additional three squares shaded.
Determine what numbers must be filled into the shaded squares to make the grid puzzle-ready and then complete the Latin Square.
This is USAMTS, round 2, problem 1, year 2021-2022. As usual, the official solutions do not explain how to arrive at the answer.
Number the squares from left to right and top to bottom starting from 1 and let $c_i$ be the number in the ith square. In the mentioned figures, the number of each square is in the top right corner while its value is in the middle.Then in row 3, $\{c_{13},c_{14}\}=\{1,4\}$. Also, $c_{16} \in \{3,4\}$ and $c_{20}\in \{1,2,3,4\}\backslash \{c_{16}\}$. $c_6 \in \{4,5\}$.
Refer to figure 1. Suppose $c_{13} = 1$. Then $c_{14} = 4.$ We have to show that the resulting configuration is either impossible or has more than one solution. Note that because of the three ones occupying the first 3 rows and the first 3 columns, we need to fit 2 ones in the three squares $c_{19},c_{24},c_{25}$, and the only possibility is that $c_{20}=c_{24}=1.$ Then $c_{4}=3$, as that's the only place for a 3 in column 4. So $c_9=2.$ $c_{10}=2,c_{6}=5.$ $c_{25}=3$ by considering the rows with 3's. Then $c_5=4, c_{16}=3,c_{21}=4$. But then there are two final configurations; $(c_2,c_3,c_{17},c_{18},c_{22},c_{23}) = (5,2,2,4,2,5)$ or $(2,5,4,2,5,2)$ (both of these have the same values of $c_{13},c_{16},$ and $c_{20}$).
Thus we've at least deduced that $c_{13} = 4, c_{14}=1.$ There are two cases for the remaining 1's; they can be equal to $c_{20}$ and $c_{23}$ or $c_{18}$ and $c_{25}$. In the first case, $c_{18}=2,c_{3}=5.$ $c_{16}=3$ and $c_{17}=4$. $c_{22}=5,c_2=2.$ $c_6=5,c_{21}=4$. But then it's impossible to choose the numbers $c_9$ and $c_{10}$!
Hence we must have $c_{18}=1,c_{25}=1.$ We now consider the possible positions of the 3's. Either $c_{16}=3$ or $c_{21}=3$. Now refer to figure 2. Suppose $c_{21}=3$. Then considering row 4 and then column 1, $c_{16}=4,c_6=5.$ If $c_9=4,$ then $c_{10}=2$ and $c_{20}=3,c_5=4$.So $c_{22}=4$. $c_2 = 5, c_{17}=2.$ $c_3=2,c_{23}=5.$ $c_{24}=2$ and $c_4 = 3,$ which is one valid configuration! But remember that we assumed $c_9 = 4,$ so by assuming $c_9=2,$ we hope to get another configuration to show that $c_{16}=3$ (note that we can in fact get a contradiction since both configurations will have the same value of $c_{13}$ and $c_{16}$). If $c_9=2,c_{10}=4,$ and $c_{17}=2,c_{20}=3$. $c_5=2$. $c_{23}=2,c_3=5,c_4=3,c_{24}=4,c_2=4,c_{22}=5,$ and we've again completed the grid, which is shown in figure 4!
Thus we must have $c_{16}=3$. Then $c_5=3.$ $c_{24}=3.$ We'll now refer to figure 3. If $c_{23}=5,$ then $c_3 = 2, c_2=5,c_4=4,c_9=2,c_6=5,c_{10}=4,c_{21}=4,c_{20}=2,c_{12}=4,c_{22}=2,$ and we have a valid configuration. Now we'll show that there is another valid configuration with $c_{20}=2, c_{13}=4,c_{16}=3$. We try setting $c_{23}=2,c_3=5$. Then $c_{17}=4,c_2=2,c_{22}=5.$ Also, $c_9=2,c_{10}=4, c_{25}=1,c_{24}=3,c_{24}=3,c_4=4,c_5=3,$ yielding another valid configuration, shown in figure 5!
So now we know that $c_{20}\neq 2\Rightarrow c_{20} = 4$. Then $c_{10}=2, c_9=4,c_6=5,c_{21}=4,c_{17}=2,c_{22}=5,c_{23}=2,c_3=5,c_2=2,c_4=2,$ and we've completed the grid, as shown in figure 6.
Question: I was wondering if there's a simpler approach for solving this problem (i.e. one with fewer steps)?

