From dccc967e101ff0660c4cd41426c6a7b132d0256c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Renison?= <85908989+IvanRenison@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:18:50 -0300 Subject: [PATCH] Make multinomial shorter (#272) --- content/combinatorial/multinomial.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/combinatorial/multinomial.h b/content/combinatorial/multinomial.h index 99d397d7c..292522bb3 100644 --- a/content/combinatorial/multinomial.h +++ b/content/combinatorial/multinomial.h @@ -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; }