Four. (50 points) The International Mathematical Olympiad Chief Examination Committee has $n$ countries participating, with each country being represented by a team leader and a deputy team leader. Before the meeting, the participants shake hands with each other, but the team leader does not shake hands with their own deputy team leader. After the meeting, the team leader of the host country asks the participants about the number of handshakes, and everyone gives a different answer. The deputy team leader of the host country shakes hands $\frac{m^{2}+n^{2}}{50}-n+49$ times. Find the values of the real numbers $m$ and $n$.


The team leader of the host country asks $2 n-1$ people, and since the answers are all different, the possible set of answers is $A=\{0,1, \cdots, 2 n-2\}$. For each $k \in A$, there is a unique person $P(k)$ who has shaken hands with exactly $k$ people. Therefore, $P(0)$ is the only person who has not shaken hands with $P(2 n-2)$. Thus, $P(0)$ and $P(2 n-2)$ are the chief and deputy leaders of the same country, and neither of them is the deputy leader of the host country. The only person who has shaken hands with $P(1)$ is naturally $P(2 n-2)$, so $P(0)$ and $P(1)$ are the only two people who have not shaken hands with $P(2 n-3)$. Therefore, $P(1)$ and $P(2 n-3)$ are from the same country. Similarly, it can be concluded that $P(i)$ and $P(2 n-2-i) (i=2,3, \cdots, n-2)$ are from the same country. Therefore, $P(n-1)$ is the deputy leader of the host country, and he has shaken hands with exactly $n-1$ people.
$$
\begin{array}{l}
\text { Hence } \frac{m^{2}+n^{2}}{50}-n+49=n-1 \\
\Rightarrow m^{2}+(n-50)^{2}=0 \\
\Rightarrow m=0, n=50 .
\end{array}
$$