Example 5 A scientist stored the design blueprint of his time machine in a computer, setting the password to open the file as a permutation of $\{1,2, \cdots, 64\}$. He also designed a program that, when eight positive integers between $1 \sim 64$ are input each time, the computer will indicate the order (from left to right) of these eight numbers in the password. Please design an operation scheme such that the password can be determined with at most 45 inputs. [6]
Let the password be denoted as $a_{1} a_{2} \cdots a_{n^{2}} (n=8)$.
First, write the numbers $1, 2, \cdots, n^{2}$ arbitrarily into an $n \times n$ grid (one number per cell). After the first $n$ operations, input each row of numbers once, and rearrange the numbers in each row from left to right according to the computer's prompt.

Color the numbers in the 1st and $n$-th columns red and yellow, respectively, and color the numbers in the other columns blue.

In the $(n+1)$-th and $(n+2)$-th operations, input the numbers in the 1st and $n$-th columns, respectively, to determine the order of the red and yellow numbers in the password, and identify $a_{1}$ and $a_{n^{2}}$. Remove these two numbers from the 1st and $n$-th columns, and replace them with adjacent blue numbers.

In the $(n+3)$-th operation, input the $\frac{n}{2}-1$ leftmost (rightmost) red (yellow) numbers in the password along with the blue numbers in the 1st and $n$-th columns to determine $a_{2}$ and $a_{n^{2}-1}$. Remove these two numbers from the 1st and $n$-th columns and replace them with adjacent blue numbers.
Similarly, determine $a_{3}, a_{4}, \cdots, a_{n^{2}-2}$ using the following two methods:

Operation $A$: When the number of blue numbers in the 1st and $n$-th columns is less than $\frac{n}{2}$, input these blue numbers along with several red (yellow) numbers from the left (right) of the password to form $n$ numbers (take $\frac{n}{2}$ numbers from each of the 1st and $n$-th columns). This will determine the leftmost and rightmost remaining numbers in the password. Remove these two numbers and replace them with adjacent blue numbers.

Operation $B$: When the number of blue numbers in the 1st (or $n$-th) column is $\frac{n}{2}$, input all the numbers in the 1st (or $n$-th) column (re-color them as red (or yellow)) to determine the leftmost (or rightmost) remaining number in the password. Remove this number and replace it with an adjacent blue number.

The $(n+3)$-th operation can be considered as Operation $A$; the $(n+1)$-th and $(n+2)$-th operations can be considered as Operation $B$.
The feasibility of the operations is obvious.
Assume that Operations $A$ and $B$ are performed $x$ and $y$ times, respectively, to determine all $\{a_{i}\}$.

Since each Operation $A$ determines two numbers, each Operation $B$ determines one number, and the last operation determines $n$ or $n-1$ numbers, we have:
$$
2(x-1) + y + n - 1 \leqslant n^{2}.
$$

Consider the number of blue numbers in the 1st and $n$-th columns, which can increase by at most 2 in each Operation $A$ and decrease by $\frac{n}{2}-1$ in each Operation $B$.
If the last operation is Operation $B$, then
$$
2 + 2x \geqslant \left(\frac{n}{2} - 1\right)(y - 2) + 1;
$$

If the last operation is Operation $A$, then
$$
2 + 2(x - 1) \geqslant \left(\frac{n}{2} - 1\right)(y - 2).
$$

From equations (1) and (2), we have
$$
\begin{array}{l}
2x + y - 1 \geqslant \frac{n}{2}(y - 2) \\
\Rightarrow n^{2} - n + 2 \geqslant \frac{n}{2}(y - 2) \\
\Rightarrow \frac{y}{2} \leqslant n + \frac{2}{n}.
\end{array}
$$

Thus, the total number of operations is
$$
\begin{array}{l}
n + x + y = n + \frac{(2x + y) + y}{2} \\
\leqslant n + \frac{n^{2} - n + 3}{2} + n + \frac{2}{n} \\
= \frac{(n + 1)(n + 2) + 1}{2} + \frac{2}{n} = 45 \frac{3}{4} \\
\Rightarrow n + x + y \leqslant 45.
\end{array}
$$