From 250294fbfcea8336e298bfe530a1d8eed1c250e5 Mon Sep 17 00:00:00 2001 From: subcrip Date: Sat, 30 Nov 2024 13:01:43 +0000 Subject: [PATCH] Update template.cc Signed-off-by: subcrip --- template.cc | 1 + 1 file changed, 1 insertion(+) 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