Let $\emptyset \subsetneq S \subsetneq \{1,\cdots,n\}$ be a set with cardinality $s$, and $g\in\mathbb{R}^n$ be a vector such that $$\sum_{\{i,j\}\subseteq \{1,\cdots,n\}}{(g_i-g_j)^2} = s(n-s).$$
Question. Is this true? $$\sum_{\{i,j\}\subseteq \partial S \\(g_i-g_j)^2\le1}{(g_i-g_j)^2} \ge \frac{s(n-s)}{n}$$ where $\partial S$ is the set of all $2$-subsets $\{i,j\}\subseteq \{1,\cdots,n\}$ that exactly one of $i$ or $j$ is in $S$.