位运算
统计1的个数
int count(int x)
{
int res=0;
while(x){
res++;
x&=x-1;
}
return res;
}
统计1的个数
int count(int x)
{
int res=0;
while(x){
res++;
x&=x-1;
}
return res;
}
暂无评论。
评论功能维护中,当前仅展示历史评论。