for (int i = 1; i <= n; ++i){ for (int j = i + 1; j <= n; ++j){ ans += calc(a[i], a[j]) } }
怎么把这段代码优化成n=1e5的时候能过?