摘要: #include #include //#include using namespace std;int main () { int myints[] = {32,71,12,45,26,67,53,68}; int l=sizeof(myints)/sizeof(myints[0]);//数组... 阅读全文
posted @ 2015-04-25 20:52 默默成长 阅读(309) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int func(int x){ int count=0; while(x) { x=x&(x-1);//与的次数就是包含1的个数 count++; } return count;}void main(){ int x; cin>>x; ... 阅读全文
posted @ 2015-04-25 14:56 默默成长 阅读(299) 评论(1) 推荐(0) 编辑