5. The inequality $x^{2}-|2 x-4| \geqslant p$ holds for all real numbers $x$. Then the correct conclusion is ( ).
(A) $p$ has both a maximum value and a minimum value
(B) $p$ has a maximum value, but no minimum value
(C) $p$ has no maximum value, but has a minimum value
(D) $p$ has neither a maximum value nor a minimum value
5. (B).

When $x \geqslant 2$, $x^{2}-$
$$
|2 x-4|=x^{2}-2 x+
$$
$4=(x-1)^{2}+3 \geqslant 4$; when $x<2$, $x^{2}-|2 x-4|=x^{2}+$ $2 x-4=(x+1)^{2}-5 \geqslant-5$. Therefore, $p$ has a maximum value of -5, and no minimum value.