![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM基础
Hrbust_cx
这个作者很懒,什么都没留下…
展开
-
位运算
进制转换提到位运算,不得不说的是进制的概念。我们在日常生活中使用的往往是十进制,但是在计算机中却是以二进制存储信息。同样常用的有八进制和十六进制。如何进行进制转换呢? 首先是从十进制转换成N进制:对这个十进制数进行mod(N)运算直到结果为0,再将得到的模数反过来输出就是结果。 例如,将十进制的6转换成二进制,6%2=0(6/2=3),3%2=1(3/2=1),1%2=1(1/2=0),逆序输出原创 2017-09-22 09:46:23 · 520 阅读 · 0 评论 -
CodeForces 627A : XOR Equation(位运算性质)
time limit per test2 seconds memory limit per test256 megabytes input standard input output standard outputTwo positive integers a and b have a sum of s and a bitwise XOR of x. How many possibl...原创 2017-11-24 09:06:22 · 424 阅读 · 0 评论 -
Codeforces 900C - Remove Extra One(思维好题)
Remove Extra One time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard outputYou are given a permutation ppp of length nnn. Remove one element from p...原创 2018-01-06 22:50:02 · 444 阅读 · 0 评论