随笔分类 -  位运算

第I位是0/1
摘要:int a; scanf("%d",&a); for(int i =0;i>i)&1;//从右往左第i位是x ,i==0,就是第一位 printf("%d ",x); } 阅读全文

posted @ 2019-08-24 17:00 cltt 阅读(140) 评论(0) 推荐(0) 编辑

移位运算
摘要:ll ans=3*(1<<3); printf("%lld\n",ans); 24 int k1 =3,k2=3; k1<<=1; k2>>=1; printf("%d %d\n",k1,k2);//6 1 阅读全文

posted @ 2019-03-18 22:01 cltt 阅读(112) 评论(0) 推荐(0) 编辑

zoj 4057
摘要:#include #include #include #include #include #include using namespace std; #define ll long long const int N =1e5+9; int t,n,a[N]; int b[50]; /* 要想两个数的异或结果比两者都大 必须两数的首位都为1,其他位... 阅读全文

posted @ 2018-09-18 09:32 cltt 阅读(185) 评论(0) 推荐(0) 编辑

牛客练习赛22 C 简单瞎搞题
摘要:128536K E. AC Challenge Dlsj is competing in a contest with n (0 < n \le 20)n(0<n≤20) problems. And he knows the answer of all of these problems. Howe 阅读全文

posted @ 2018-07-16 09:26 cltt 阅读(219) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示