5. (2002 Japan Mathematical Olympiad) 14 people participate in a Japanese chess round-robin tournament, where each person plays against the other 13 people. There are no ties in the matches. Find the maximum number of "triangular ties" (here, a "triangular tie" refers to a situation where 3 people each have one win and one loss against each other).
5. Represent 14 people as $A_{1}, A_{2}, \cdots, A_{14}$, and let $A_{i}$ win $a_{i}$ games. If there is no "triangle" among any 3 people, then there must be one person who wins the other two, hence no "triangle" trio. The number of such trios is $\sum_{i=1}^{14} C_{a_{i}}^{2}$ (with the convention that $C_{0}^{2}=C_{1}^{2}=0$). Therefore, the number of "triangle" trios is $S=C_{14}^{3}-\sum_{i=1}^{14} C_{a_{i}}^{2}$. To find the maximum value of $S$, we need to find the minimum value of $\sum_{i=1}^{14} C_{a_{i}}^{2}$. Since there are no ties, $\sum_{i=1}^{14} a_{i}=C_{14}^{2}=91$. First, we prove that if $\sum_{i=1}^{14} C_{a_{i}}^{2}$ is minimized, then $\left|a_{i}-a_{j}\right| \leqslant 1(1 \leqslant i<j \leqslant 14)$. Indeed, if there exist $1 \leqslant i, j \leqslant 14$ such that $a_{j}-a_{i} \geqslant 2$, let $a^{\prime}{ }_{i}=a_{i}+1, a_{j}^{\prime}=a_{j}-1, a_{k}^{\prime}=a_{k}(k \neq i, j)$, then $a_{k}^{\prime} \geqslant 0(1 \leqslant k \leqslant 14)$ and $\sum_{k=1}^{14} a_{k}^{\prime}=\sum_{k=1}^{14} a_{k}=91$, and $\sum_{k=1}^{14} C_{a_{k}}^{2}-\sum_{k=1}^{14} C_{a_{k}}^{2}=C_{a_{i}+1}^{2}+C_{a_{j}-1}^{2}-C_{a_{i}}^{2}-C_{a_{j}}^{2}=C_{a_{i}}^{1}-C_{a_{j}-1}^{1}=a_{i}-\left(a_{j}-1\right)=-\left(a_{j}-a_{i}-1\right)<0$, which contradicts the assumption that $\sum_{i=1}^{14} C_{a_{i}}^{2}$ is minimized. Therefore, when $\sum_{i=1}^{14} C_{a_{i}}^{2}$ is minimized, $\left|a_{i}-a_{j}\right| \leqslant 1(1 \leqslant i<j \leqslant 14)$. Without loss of generality, assume that among $a_{1}, a_{2}, \cdots, a_{14}$, there are $n$ values of $x+1$ and $14-n$ values of $x$, then $n(x+1)+(14-n) x=91, n+14 x=91$, so $x, n$ are the quotient and remainder of 91 divided by 14, i.e., $x=6, n=7$, meaning that $a_{1}, \cdots, a_{14}$ have 7 values of 6 and 7 values of 7 when $\sum_{i=1}^{14} C_{a_{i}}^{2}$ is minimized, which is $7 \times C_{6}^{2}+7 \times C_{7}^{2}=252$. Therefore, the maximum value of "triangle" trios is $S=C_{14}^{3}-252=112$. On the other hand, when $1 \leqslant i \leqslant 7$, let $A_{i}$ win $A_{i+1}, A_{i+2}, \cdots, A_{i+6}$ (with the convention that $A_{j+14}=A_{j}$) and lose to the other 7 people; when $8 \leqslant j \leqslant 14$, let $A_{i}$ win $A_{i+1}, A_{i+2}, \cdots, A_{i+7}$ (with the convention that $A_{j+14}=A_{j}$) and lose to the other 6 people, then the number of "triangle" trios is exactly $C_{14}^{2}-\left(7 C_{6}^{2}+6 C_{7}^{2}\right)=112$. In summary, the maximum number of "triangle" trios is 112.