1
0
Fork 0

Update template.cc

Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
subcrip 2024-11-30 13:01:43 +00:00
parent 7d11856544
commit 250294fbfc
1 changed files with 1 additions and 0 deletions

View File

@ -286,6 +286,7 @@ inline ll root(ll n, ll i) {
#define comb(n, k) ((n) < 0 or (k) < 0 or (n) < (k) ? 0 : fact[n] / fact[k] / fact[(n) - (k)])
#define fastcomb(n, k) ((n) < 0 or (k) < 0 or (n) < (k) ? 0 : fact[n] * factrev[k] * factrev[(n) - (k)])
__attribute__((target("lzcnt")))
constexpr inline int lg2(ll x) { return x == 0 ? -1 : sizeof(ll) * 8 - 1 - __builtin_clzll(x); }
template <typename T>