When the number of teams $m$ is even, the maximum number of friendly groups is $\frac{m(m-2)(m+2)}{24}$.
(1) When $m$ is odd, let $m=2n+1$. Since there are $2n+1$ teams playing a round-robin tournament, there are a total of $C_{2n+1}^{2}$ matches. Suppose there are $x$ friendly groups. Consider the opposite: if teams A, B, and C form a non-friendly group, and team A wins against teams B and C, then team A is considered the leader of the non-friendly group.
For team A, any two teams it wins against can form a non-friendly group. Therefore, if team $A_i (i=1,2,\cdots,2n+1)$ wins $k_i$ matches, then $\sum_{i=1}^{2n+1} k_i = C_{2n+1}^{2}$, and the number of non-friendly groups with $A_i$ as the leader is $C_{k_i}^{2}$ (additional definition: $C_0^2 = C_1^2 = 0$). Thus, the number of non-friendly groups is
$$
\begin{array}{l}
\sum_{i=1}^{2n+1} C_{k_i}^{2} = \frac{1}{2} \sum_{i=1}^{2n+1} k_i^2 - \frac{1}{2} \sum_{i=1}^{2n+1} k_i \geq \frac{1}{2(2n+1)} \left( \sum_{i=1}^{2n+1} k_i \right)^2 - \frac{1}{2} \sum_{i=1}^{2n+1} k_i \\
= \frac{2n(2n+1)}{4} \left[ \frac{1}{2n+1} \cdot \frac{2n(2n+1)}{2} - 1 \right] = \frac{n(n-1)(2n+1)}{2},
\end{array}
$$

Equality holds when $k_1 = k_2 = \cdots = k_{2n+1} = n$.
Thus, $x \leq C_{2n+1}^{3} - \frac{n(n-1)(2n+1)}{2} = \frac{n(n+1)(2n+1)}{6} = \frac{m(m-1)(m+1)}{24}$.
Example construction: In the $2n+1$ teams $A_1, A_2, \cdots, A_{2n+1}$, team $A_i$ wins against $A_{i+1}, A_{i+2}, \cdots, A_{i+n}$ and loses against $A_{i-1}, A_{i-2}, \cdots, A_{i-n}$, where the indices are taken modulo $2n+1$. The number of friendly groups is $\frac{n(n+1)(2n+1)}{6}$.
(2) When $n$ is even, similarly, if team $A_i (i=1,2,\cdots,2n)$ wins $k_i$ matches, then $\sum_{i=1}^{2n} k_i = C_{2n}^{2}$, and the number of non-friendly groups with $A_i$ as the leader is $C_{k_i}^{2}$ (additional definition: $C_0^2 = C_1^2 = 0$).
Thus, the number of non-friendly groups is $\sum_{i=1}^{2n} C_{k_i}^{2}$. We now seek the minimum value of $\sum_{i=1}^{2n} C_{k_i}^{2}$.
If in $k_1, k_2, \cdots, k_{2n}$, without loss of generality, let $k_j - k_i \geq 2$. Then let $k_i^* = k_i + 1, k_j^* = k_j - 1$, and the rest $k_l^* = k_l (1 \leq l \leq 2n, l \neq i, j)$. Thus, $\sum_{i=1}^{2n} C_{k_i^*}^{2} - \sum_{i=1}^{2n} C_{k_i}^{2} = C_{k_i+1}^{2} + C_{k_j-1}^{2} - C_{k_i}^{2} - C_{k_j}^{2}$
$$
= \frac{k_i(k_i+1) - k_i(k_i-1)}{2} + \frac{(k_j-1)(k_j-2) - k_j(k_j-1)}{2} = \frac{2k_i - 2(k_j-1)}{2} = k_i - k_j + 1 < 0,
$$

Thus, after adjustment, $\sum_{i=1}^{2n} C_{k_i}^{2}$ decreases.
Repeat the above operation until the difference between any two numbers $k_i$ is at most 1. Without loss of generality, assume there are $y$ numbers $a$ and $2n-y$ numbers $a+1$ in $k_1, k_2, \cdots, k_{2n}$, then $y a + (2n-y)(a+1) = C_{2n}^{2} = n(2n-1)$
$\Rightarrow 2na - y = 2n^2 - 3n \Rightarrow a - \frac{y}{2n} = n-1 - \frac{1}{2}$, since $1 \leq y \leq 2n-1$, thus $a = n-1, y = n$. After adjustment, there are $n$ numbers $n-1$ and $n$ numbers $n \Rightarrow \sum_{i=1}^{2n} C_{k_i}^{2} = n(n-1)^2$.
Thus, $x \leq C_{2n}^{3} - n(n-1)^2 = \frac{2n(2n-1)(n-1)}{3} - n(n-1)^2 = \frac{n(n-1)(n+1)}{3}$.
Example construction: In the $2n$ teams $A_1, A_2, \cdots, A_{2n}$, when $1 \leq i \leq n$, team $A_i$ wins against $A_{i+1}, A_{i+2}, \cdots, A_{i+n}$; when $n+1 \leq i \leq 2n$, team $A_i$ wins against $A_{i+1}, A_{i+2}, \cdots, A_{i+n-1}$, where the indices are taken modulo $2n$. The number of friendly groups is $\frac{n(n-1)(n+1)}{3}$.
In summary, when the number of teams $m$ is odd, the maximum number of friendly groups is $\frac{m(m-1)(m+1)}{24}$; when the number of teams $m$ is even, the maximum number of friendly groups is $\frac{m(m-2)(m+2)}{24}$.
So the answers are: (1) 285; (2) 330.
14. Definition: If Team A beats Team B, Team B beats Team C, and Team C beats Team A, then Teams A, B, and C are called a "friendly group".
(1) If 19 teams participate in a round-robin tournament, find the maximum number of friendly groups;
(2) If 20 teams participate in a round-robin tournament, find the maximum number of friendly groups.