This documentation is automatically generated by online-judge-tools/verification-helper
#include "src/utility/bit/popcount.hpp"
usize popcount(u64 n)
n
を二進表記したときの1の数を返す。
C++20 以降では std::popcount(T n)
を使用すること。
基本方針として、「 $2^i$ bit ごとに区切り、それぞれの区間ごとにいくつ立っている bit があったか」を計算している。