diff --git a/template.cc b/template.cc index 55e1bc6..dd9e423 100644 --- a/template.cc +++ b/template.cc @@ -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