5. As shown in Figure 2, the square $A B C D$ is divided into two equal areas by the line $O E$. Given that the lengths of segments $O D$ and $A D$ are positive integers, and $\frac{C E}{B E}=20$. Then the minimum value of the area of the square $A B C D$ that satisfies the above conditions is ( ).
(A) 324
(B) 331
(C) 354
(D) 361
5. D.

As shown in Figure 6, since the square $ABCD$ is divided into two equal areas by the line $OE$, the line $OE$ passes through the center $P$ of the square.

Therefore, $BE = GD$.
Let $OD = n$, $AD = m$. Then
$$
\frac{CE}{BE} = \frac{CE}{GD} = \frac{OC}{OD} = \frac{n + m}{n} = 20 \text{.}
$$

Thus, $m = 19n \geq 19$.
When $n = 1$, $m = 19$.
Therefore, the minimum area of the square $ABCD$ is
$$
19^2 = 361 \text{.}
$$