• [deleted]
    + 0 comments

    Could someone explain what the loops mean? This is taken from Editorial

        for(int i=k; i<=n; i++) ans += a[i] * C(i-1, k-1) % MOD;
    for(int i=1; i<=n-k+1; i++) ans -= a[i] * C(n-i, k-1) % MOD;