
codeforce
文章平均质量分 80
snbsczw
欲说还休,欲说还休,却道天凉好个秋
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Educational Codeforces Round 26 C. Two Seals
C. Two Seals time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One very important person has a piece of paper原创 2017-08-06 17:47:21 · 311 阅读 · 0 评论 -
求连续自然数区间的异或值
如题: 求[a,b]内所有数的异或值.为了方便用f([a,b])表示[a,b]内所有数的异或值. 首先,根据异或的规则可得 f([a,b])=f([1,b])^f([1,a-1]). 所以只要会求f([1,n])就可以了 1. 若a是偶数,则a^a+1=1; 这样就可以掐头去尾 中间的数两两配对 就算出来了 代码:ll GEt_ans(ll a)//求f([1,a]原创 2018-03-07 15:33:40 · 2437 阅读 · 0 评论