摘要:
lowbit(x)=x&-x 功能:找到x的二进制数的最后一个1 原理:负数的补码,补码是原码取反+1 例如:x=6=00000110,-x=11111010,x&-x=10=2 阅读全文
posted @ 2020-04-18 22:12
XXXSANS
阅读(256)
评论(0)
推荐(0)
摘要:
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number 阅读全文
posted @ 2020-04-18 15:03
XXXSANS
阅读(432)
评论(0)
推荐(1)
摘要:
Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaoli 阅读全文
posted @ 2020-04-18 13:56
XXXSANS
阅读(229)
评论(0)
推荐(0)
摘要:
两者完全等等价。指针成员运算时,由于.比*级别度高,如果直接写成*a.b就相当于*(a.b)了,这是错误的,所以只好用括号提高*的优先回级(*a).b。很明显,这么写很繁琐,于是就用a->b代替(*a).b了,唯一的目答的就是简化 有的时候看不懂的时候转换一下会比较好看 例: ((RCC_TypeD 阅读全文
posted @ 2020-04-18 12:21
XXXSANS
阅读(977)
评论(0)
推荐(0)

浙公网安备 33010602011771号