G. The number of non-overlapping triangles formed with the vertices of a regular $n$-sided polygon is equal to ( ).
(A) $\left[\frac{n^{2}}{10}\right]$
(B) $\left[\frac{n^{2}}{11}\right]$
(C) $\left[\frac{n^{2}}{12}\right]$
(D) None of the above
6. D.

Let the number of distinct triangles formed by the vertices of a regular $n$-sided polygon be $N$, among which there are $N_{1}$ equilateral triangles, $N_{2}$ isosceles triangles that are not equilateral, and $N_{3}$ scalene triangles. There is 1 equilateral triangle with vertex $A$, 3 isosceles triangles, and 6 scalene triangles. The number of triangles with vertex $A$ is $\frac{1}{2}(n-1)(n-2)$, so we have
$$
\frac{1}{2}(n-1)(n-2)=N_{1}+3 N_{2}+6 N_{3} \text {. }
$$

Clearly, the number of distinct equilateral triangles is 0 or 1, and the number of distinct isosceles triangles is $\frac{n-1}{2}$ or $\frac{n}{2}-1$. Let $N_{1}=1-p$, $N_{1}+N_{2}=\frac{1}{2}(n-2-q)$, where $p$ and $q$ take 0 or 1. Therefore,
$$
\begin{aligned}
& 12 N=12\left(N_{1}+N_{2}+N_{3}\right) \\
= & 2\left(N_{1}+3 N_{2}+6 N_{3}\right)+6\left(N_{1}+N_{2}\right)+4 N_{1} \\
= & (n-1)+(n-2)+3(n-2+q)+4(1-p) \\
= & n^{2}+3 q-4 p .
\end{aligned}
$$

Since $|3 q-4 p|<6$, $N$ is the integer closest to $\frac{n^{2}}{12}$.