5. There are $n$ people registered to participate in four sports competitions: A, B, C, and D. It is stipulated that each person must participate in at least one competition and at most two competitions, but competitions B and C cannot be registered for simultaneously. If in all different registration methods, there must exist one method where at least 20 people register, then the minimum value of $n$ is $(\quad$.
(A) 171
(B) 172
(C) 180
(D) 181
5. B.

Use the ordered array $\left(a_{\text {甲 }}, b_{\text {乙 }}, c_{\text {丙 }}, d_{\mathrm{J}}\right)$ to represent each person's registration for the four sports events 甲, 乙, 丙, and 丁. If a person participates in a certain event, the corresponding number is recorded as 1 (for example, if participating in event 甲, record $a_{\text {甲 }}=1$); if not participating in a certain event, the corresponding number is recorded as 0 (for example, if not participating in event 甲, record $a_{\text {甲 }}=0$).

Thus, each person's registration method for the events can be one of the following nine possibilities:
$$
\begin{array}{l}
(1,1,0,0),(1,0,1,0),(1,0,0,1), \\
(0,1,0,1),(0,0,1,1),(1,0,0,0), \\
(0,1,0,0),(0,0,1,0),(0,0,0,1) .
\end{array}
$$

Using these nine possibilities as the nine drawers, by the known pigeonhole principle, we have $n=19 \times 9+r$.
When $r=1$, the minimum value of $n$ is 172.