32. Let $1 \leqslant r \leqslant n$, in the ordered tuple $\left(x_{1}, x_{2}, \cdots, x_{r}\right)$ each $x_{j} \in\{1,2, \cdots, n\}$, and for each $i=1$, $2, \cdots, n, x_{1}, x_{2}, \cdots, x_{r}$ contains at most $i-1$ elements $\leqslant i$. Find the number of such $r$-tuples.
32. Let the number of such arrays be denoted as $f(r, n)$. Removing each number equal to $n$ from the arrays $x_{1}, x_{2}, \cdots, x$, if the number of $n$'s is $r-k$, then we obtain a $k$-element array, which still satisfies the condition that there are at most $i-1$ numbers $\leqslant i (i=1,2, \cdots, n-1)$. Hence, such arrays have $f(k, n-1)$ (with the convention $f(0, n-1)=1$). The positions of the $r-k$ numbers removed from $x_{1}, x_{2}, \cdots, x$ have $C_{r}^{r-k}$ possibilities, so $f(r, n)=\sum_{k=0}^{r} C_{r}^{r-k} f(k, n-1)=\sum_{k=0}^{r} C_{r}^{k} f(k, n-1)$. We will prove by induction that: $f(r, n)=(n-r) \cdot n^{r-1}$. For $n=1$, we have $f(0,1)=1, f(1,1)=0$, and the proposition is clearly true. Assume $f(r, n)=(n-r) \cdot n^{r-1}$ holds for $n=t$ and any $r$, then $f(r, t+1)=\sum_{k=0}^{r} C_{r}^{k} f(k, t)=\sum_{k=0}^{t} C_{r}^{k}(t-k) t^{k-1}=\sum_{k=0}^{r} C_{r}^{k} t^{k}-\sum_{k=0}^{t} k C_{r}^{k} t^{k-1}=(t+1)^{r}-r \sum_{k=1}^{t} C_{r-1}^{k-1} \cdot$ $t^{k-1}=(t+1)^{r}-r(t+1)^{r-1}=(t+1-r)(t+1)^{r-1}$, i.e., $f(r, n)=(n-r) \cdot n^{r-1}$ holds for $n=t+1$ and any $r$. Therefore, for any $r, n, f(r, n)=(n-r) \cdot n^{r-1}$ holds, so the number of $r$-element arrays is $(n-r) \cdot n^{r-1}$.