5. Given positive numbers $a, b, c, d$ satisfy
$$
a+2 b=1, c+2 d=1 \text {. }
$$

Then the minimum value of $\frac{1}{a}+\frac{1}{b c d}$ is ( ).
(A) $\frac{1}{16}$
(B) 8
(C) $\frac{1}{5}$
(D) 25
5. D.

By the AM-GM inequality and the given conditions, we have
$$
\begin{array}{l}
2 c d \leqslant\left(\frac{c+2 d}{2}\right)^{2}=\frac{1}{4} \\
\Rightarrow c d \leqslant \frac{1}{8} .
\end{array}
$$

Equality in (1) holds if and only if $c=\frac{1}{2}, d=\frac{1}{4}$. From (1), we get
$$
\frac{1}{a}+\frac{1}{b c d} \geqslant \frac{1}{a}+\frac{8}{b} \text {. }
$$

By the conditions and the Cauchy-Schwarz inequality, we have
$$
\begin{array}{l}
\frac{1}{a}+\frac{8}{b}=\left(\frac{1}{a}+\frac{8}{b}\right)(a+2 b) \\
\geqslant(1+4)^{2}=25 .
\end{array}
$$

Equality in (3) holds if and only if $b=2 a$. Combining this with the conditions, we find that $a=\frac{1}{5}, b=\frac{2}{5}$ at this time. From (2) and (3), we get $\frac{1}{a}+\frac{1}{b c d} \geqslant 25$.
Equality holds when $a=\frac{1}{5}, b=\frac{2}{5}, c=\frac{1}{2}, d=\frac{1}{4}$.