20. $n$ people stand in a line, where A does not stand at the head of the line, and B does not stand in the second position. How many arrangements are there?
20. Let $A$ be the set of all permutations where person A stands at the head of the line, and $B$ be the set of all permutations where person B stands in the second position,
$$
\begin{array}{l}
\quad|\bar{A} \cdot \bar{B}|=|I|-|A \cup B|=|I|-|A|-|B|+|A \cdot B|=n!-2(n \\
-1)!+(n-2)!.
\end{array}
$$