for (int i = n; i; --i) for (int j = i + 1; j <= n; ++j) fms(h[i], h[j], C[j][i]); int ans = 0; for (int i = 1; i <= n; ++i) reduce(ans += h[i] - mod);
太好了太好了,我会了!!!