6. (8 points) In a basket, there are $2 n$ identical oranges, $2 n$ identical apples, and $2 n$ identical pears. In how many ways can we divide all the fruits between two children so that each gets $3 n$ fruits?
Solution: Let's fix a child and denote by $x$ the number of oranges given to him, $y$ - apples, and $z$ - pears. We get two essentially different cases:

1) $0 \leqslant x \leqslant n$, then $n-x \leqslant y \leqslant 2 n$ and $z$ is uniquely determined. The number of such ways

$$
(n+1)+(n+2)+\ldots+(2 n+1)=\frac{(2 n+1)(2 n+2)}{2}-\frac{n(n+1)}{2}
$$

2) $n+1 \leqslant x \leqslant 2 n$, then $0 \leqslant y \leqslant 3 n-x$ and $z$ is uniquely determined. The number of such ways

$$
2 n+(2 n-1)+\ldots+(n+1)=\frac{2 n(2 n+1)}{2}-\frac{n(n+1)}{2}
$$

In total, the number of ways is

$$
\begin{aligned}
& \frac{(2 n+1)(2 n+2)}{2}-\frac{n(n+1)}{2}+\frac{2 n(2 n+1)}{2}-\frac{n(n+1)}{2}= \\
= & (2 n+1)(n+1)+(2 n+1) n-n(n+1)=3 n^{2}+3 n+1
\end{aligned}
$$

Answers:

| Variant | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| Answer | 721 | 919 | 631 | 817 | 631 | 1141 | 1027 | 1387 | 721 | 1519 |