int clz(int N) { return N ? 32 - __builtin_clz(N) : -inf; } int clz(unsigned long long N) { return N ? 64 - __builtin_clzll(N) : -inf; }