10. (20 points) Given the function
$$
f(x)=a(|\sin x|+|\cos x|)-3 \sin 2 x-7 \text {, }
$$

where $a$ is a real parameter. Find all pairs $(a, n)(n \in \mathrm{N}_{+})$ such that the function $y=f(x)$ has exactly 2011 zeros in the interval $(0, n \pi)$.
10. First, the function $f(x)$ has a period of $\pi$, and is symmetric about $x=\frac{k \pi}{2}+\frac{\pi}{4}(k \in \mathbf{Z})$, i.e.,
$$
\begin{array}{l}
f(x+\pi)=f(x), \\
f\left(k \pi+\frac{\pi}{2}-x\right)=f(x)(k \in \mathbf{Z}) .
\end{array}
$$

Second, $f\left(\frac{k \pi}{2}\right)=a-7$,
$$
\begin{array}{l}
f\left(k \pi+\frac{\pi}{4}\right)=\sqrt{2} a-10, \\
f\left(k \pi+\frac{3 \pi}{4}\right)=\sqrt{2} a-4 .
\end{array}
$$

Since $f(x)$ is symmetric about $x=\frac{k \pi}{2}+\frac{\pi}{4}$, the number of zeros of $f(x)$ in $\left(\frac{k \pi}{2}, \frac{k \pi}{2}+\frac{\pi}{4}\right)$ and $\left(\frac{k \pi}{2}+\frac{\pi}{4}, \frac{k \pi}{2}+\frac{\pi}{2}\right)$ is even.

To make $f(x)$ have exactly 2011 zeros in the interval $(0, n \pi)$, the endpoints of the above intervals must have zeros.
(1) If $a=7$, then
$$
f\left(\frac{k \pi}{2}\right)=0, f\left(\frac{k \pi}{2}+\frac{\pi}{4}\right) \neq 0 \text {. }
$$

Consider the number of zeros in the intervals $\left(0, \frac{\pi}{2}\right)$ and $\left(\frac{\pi}{2}, \pi\right)$.
When $x \in\left(0, \frac{\pi}{2}\right)$,
$$
f(x)=7(\sin x+\cos x)-3 \sin 2 x-7 \text {. }
$$

Let $t=\sin x+\cos x(t \in(1, \sqrt{2}])$. Then
$$
y=g(t)=-3 t^{2}+7 t-4=0 \text {. }
$$

Solving, we get $t_{1}=1$ (discard), $t_{2}=\frac{4}{3}=\sqrt{2} \sin \left(x+\frac{\pi}{4}\right)$.
Thus, there are two solutions in $\left(0, \frac{\pi}{2}\right)$.
When $x \in\left(\frac{\pi}{2}, \pi\right)$,
$$
f(x)=7(\sin x-\cos x)-3 \sin 2 x-7 \text {. }
$$

Let $t=\sin x-\cos x(t \in(1, \sqrt{2}])$. Then
$$
y=g(t)=3 t^{2}+7 t-10=0 \text {. }
$$

Solving, we get $t_{1}=1$ (discard), $t_{2}=-\frac{10}{3}$ (discard).
Thus, there are no solutions in $\left(\frac{\pi}{2}, \pi\right)$.
Therefore, $f(x)$ has three zeros in the interval $(0, \pi)$. Hence, in $(0, n \pi)$, there are
$$
3 n+(n-1)=4 n-1=2011 \text {. }
$$

zeros. Solving, we get $n=503$.
(2) If $a=5 \sqrt{2}$, then
$$
f\left(k \pi+\frac{\pi}{4}\right)=0, f\left(\frac{k \pi}{2}\right) \neq 0, f\left(k \pi+\frac{3 \pi}{4}\right) \neq 0 .
$$

When $x \in\left(0, \frac{\pi}{2}\right)$,
$$
f(x)=5 \sqrt{2}(\sin x+\cos x)-3 \sin 2 x-7 \text {. }
$$

Let $t=\sin x+\cos x(t \in(1, \sqrt{2}])$. Then
$$
y=g(t)=-3 t^{2}+5 \sqrt{2} t-4=0 .
$$

Solving, we get $t_{1}=\sqrt{2}, t_{2}=\frac{2 \sqrt{2}}{3}<1$ (discard).
Thus, there is one solution $x=\frac{\pi}{4}$ in $\left(0, \frac{\pi}{2}\right)$.
When $x \in\left(\frac{\pi}{2}, \pi\right)$,
$$
f(x)=5 \sqrt{2}(\sin x-\cos x)-3 \sin 2 x-7 \text {. }
$$

Let $t=\sin x-\cos x(t \in(1, \sqrt{2}])$. Then
$$
y=g(t)=3 t^{2}+5 \sqrt{2} t-10=0,
$$

There are no solutions in $(1, \sqrt{2}]$.
Thus, $f(x)$ has only one zero in the interval $(0, \pi)$. Therefore, in $(0, n \pi)$, there are $n=2011$ zeros.
(3) If $a=2 \sqrt{2}$, then
$$
f\left(k \pi+\frac{3 \pi}{4}\right)=0, f\left(\frac{k \pi}{2}\right) \neq 0, f\left(k \pi+\frac{\pi}{4}\right) \neq 0 \text {. }
$$

Similarly to (2), we find that $f(x)$ has only one zero in the interval $(0, \pi)$.
Thus, in $(0, n \pi)$, there are $n=2011$ zeros.
In summary, the pairs $(a, n)$ that satisfy the conditions are
$$
(a, n)=(7,503),(5 \sqrt{2}, 2011),(2 \sqrt{2}, 2011) .
$$