Example 5 In a competition consisting of $n$ true/false questions, 8 contestants participate. It is known that for any pair of true/false questions $(A, B)$ (referred to as an ordered pair), exactly two people's answers are (true, true); exactly two people's answers are (true, false); exactly two people's answers are (false, true); exactly two people's answers are (false, false). Find the maximum value of $n$, and explain the reasoning.
Let the 8 contestants be $P_{1}, P_{2}, \cdots, P_{8}$, and the $n$ true/false questions be $A_{1}, A_{2}, \cdots, A_{n}$. Construct an $8 \times n$ table, where the number in the $i$-th row and $j$-th column is
$$
x_{i j}=\left\{\begin{array}{l}
1\left(P_{i} \text { answers "true" to } A_{j}\right) \\
0\left(P_{i} \text { answers "false" to } A_{j}\right)
\end{array}(i=1,2, \cdots, 8, j=1,2, \cdots, n)\right.
$$

Thus, the sum of the numbers in the $i$-th row, $a_{i}=\sum_{j=1}^{n} x_{i j}$, represents the number of questions $P_{i}$ answers correctly. According to the problem, each column contains exactly 4 ones and 4 zeros, so $\sum_{i=1}^{8} x_{i j}=4$. Therefore,
$$
\sum_{i=1}^{8} a_{i}=\sum_{i=1}^{8} \sum_{j=1}^{n} x_{i j}=\sum_{j=1}^{n} \sum_{i=1}^{8} x_{i j}=\sum_{j=1}^{n} 4=4 n .
$$

Note that, by the problem's conditions, if we replace all 1s with 0s and all 0s with 1s in any column, the table still satisfies the problem's conditions. Therefore, without loss of generality, we can assume that all numbers in the first row are 1, so $a_{1}=n$, and $\sum_{i=2}^{8} a_{i}=4 n-n=3 n$.

If contestant $P_{i}$ answers "true" to questions $A_{k}$ and $A_{j}$, then we form a "triple" $\left\{P_{i}, A_{k}, A_{j}\right\}$, and the set of all such triples is denoted by $S$.

On one hand, for each $P_{i}$, he answers "true" to $a_{i}$ questions, forming $C_{a_{i}}^{2}$ triples containing $P_{i}$, so $|S|=\sum_{i=1}^{8} C_{a_{i}}^{2}$.

On the other hand, for each pair of questions $A_{k}$ and $A_{j}$, exactly two contestants answer "true" to both questions, forming 2 triples containing $A_{k}$ and $A_{j}$. Since there are $C_{n}^{2}$ ways to choose a pair of questions, we have
$$
|S|=2 C_{n}^{2}=n(n-1) \text {. }
$$

By (1) and (2), and using the Cauchy-Schwarz inequality, we get
$$
\begin{aligned}
n(n-1) & =\sum_{i=1}^{8} C_{a_{i}}^{2}=C_{a_{1}}^{2}+\sum_{i=2}^{8} C_{a_{i}}^{2}=C_{n}^{2}+\frac{1}{2} \sum_{i=2}^{8} a_{i}^{2}-\frac{1}{2} \sum_{i=2}^{8} a_{i} \\
& \geqslant C_{n}^{2}+\frac{1}{2 \times 7}\left(\sum_{i=2}^{8} a_{i}\right)^{2}-\frac{1}{2} \sum_{i=2}^{8} a_{i} \\
& =C_{n}^{2}+\frac{1}{2 \times 7}(3 n)^{2}-\frac{1}{2}(3 n)=\frac{2}{7} n(4 n-7) .
\end{aligned}
$$

Solving for $n \leqslant 7$.
The following example shows that $n$ can be 7: Therefore, the maximum value of $n$ is 7.