3. An exam consists of $m$ questions, with $n$ students participating, where $m, n \geqslant 2$ are given integers. The scoring rule for each question is: if exactly $x$ students fail to answer the question correctly, then each student who answers the question correctly gets $x$ points, and those who fail to answer correctly get zero points. Each student's total score is the sum of their scores on the $m$ questions. Arrange all students' total scores in descending order as $p_{1} \geqslant p_{2} \geqslant \cdots \geqslant p_{n}$, find the maximum possible value of $p_{1}+p_{n}$.
For any $k=1,2, \cdots, m$, let the number of people who did not answer the $k$-th question correctly be $x_{k}$, then the number of people who answered the $k$-th question correctly is $n-x_{k}$. According to the scoring rule, these $n-x_{k}$ people each get $x_{k}$ points for the $k$-th question.
Let the total score of the $n$ students be $S$, then we have $S=\sum_{i=1}^{n} p_{i}=\sum_{i=1}^{m} x_{k}\left(n-x_{k}\right)=n \sum_{i=1}^{m} x_{k}-\sum_{i=1}^{m} x_{k}^{2}$. Since each student can score at most $x_{k}$ points on the $k$-th question, we have $p_{1} \leqslant \sum_{i=1}^{m} x_{k}$, and $p_{2} \geqslant \cdots \geqslant p_{n}$ $\Rightarrow p_{n} \leqslant \frac{p_{2}+\cdots+p_{n}}{n-1}=\frac{S-p_{1}}{n-1}$, thus we have
$$
\begin{array}{l}
p_{1}+p_{n} \leqslant p_{1}+\frac{S-p_{1}}{n-1}=\frac{n-2}{n-1} p_{1}+\frac{S}{n-1}=\frac{n-2}{n-1} \sum_{i=1}^{m} x_{k}+\frac{1}{n-1}\left(n \sum_{i=1}^{m} x_{k}-\sum_{i=1}^{m} x_{k}^{2}\right) \\
=2 \sum_{i=1}^{m} x_{k}-\frac{1}{n-1} \sum_{i=1}^{m} x_{k}^{2} \leqslant 2 \sum_{i=1}^{m} x_{k}-\frac{1}{m(n-1)}\left(\sum_{i=1}^{m} x_{k}\right)^{2} \\
=-\frac{1}{m(n-1)}\left[\left(\sum_{i=1}^{m} x_{k}\right)^{2}-2 m(n-1) \sum_{i=1}^{m} x_{k}\right] \\
=-\frac{1}{m(n-1)}\left[\sum_{i=1}^{m} x_{k}-m(n-1)\right]^{2}+m(n-1) \leqslant m(n-1),
\end{array}
$$

Equality holds when $\sum_{i=1}^{m} x_{k}=m(n-1)$, i.e., the score for each question is $n-1$. Consider the case where only one student answers all questions correctly, and the other $n-1$ students answer all questions incorrectly, which satisfies the problem's conditions.

In summary, the maximum possible value of $p_{1}+p_{n}$ is $m(n-1)$.