Solution (source code)

= Solution

If $T$ is the number of triads, then
$$
\mathbb ET=\binom n3\frac18<\frac{n^3}{48}.
$$
Markov's inequality therefore gives
$$
\boxed{\mathbb P(T\ge n^3/24)\le\frac12.}
$$