Skip to content

Commit

Permalink
Make multinomial shorter (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanRenison authored Oct 15, 2024
1 parent 57c9289 commit dccc967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions content/combinatorial/multinomial.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

ll multinomial(vi& v) {
ll c = 1, m = v.empty() ? 1 : v[0];
rep(i,1,sz(v)) rep(j,0,v[i])
c = c * ++m / (j+1);
rep(i,1,sz(v)) rep(j,0,v[i]) c = c * ++m / (j+1);
return c;
}

0 comments on commit dccc967

Please sign in to comment.