Update template.cc
Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
parent
20614d6737
commit
a5687a8c25
|
@ -250,6 +250,7 @@ return_t qpow(ll b, ll p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define comb(n, k) ((n) < 0 or (k) < 0 or (n) < (k) ? 0 : fact[n] / fact[k] / fact[(n) - (k)])
|
#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)])
|
||||||
|
|
||||||
constexpr inline int lg2(ll x) { return x == 0 ? -1 : sizeof(ll) * 8 - 1 - __builtin_clzll(x); }
|
constexpr inline int lg2(ll x) { return x == 0 ? -1 : sizeof(ll) * 8 - 1 - __builtin_clzll(x); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue