Three. (This question is worth $\mathbf{50}$ points) Let the set $A=\{1,2, \cdots, n\}, X, Y$ be non-empty subsets of $A$ (allowing $X=Y$). The maximum element of $X$ and the minimum element of $Y$ are denoted as $\max X, \min Y$, respectively. Find the number of ordered pairs of sets $(X, Y)$ that satisfy $\max X>\min Y$.