摘要:
Codeforces 437B 题意:在1到limit之间找最少个数,使得他们的lowbit总和等于sum。 先求出全部的lowbit()进行排序,然后扫一遍即可。 Codeforces 437C 题意:n个部分,m个连接线,拆某根线需要花费能量,为其两端连接部分的能量值中的较小值。求要把所有连接线 阅读全文
posted @ 2016-09-04 15:19
Piddnad
阅读(290)
评论(0)
推荐(0)
摘要:
因为CodeForces 437B这道题,接触到了lowbit。 先写一下函数: 以及原题上给出的定义: lowbit(x) equals 2k where k is the position of the first one in the binary representation of x. F 阅读全文
posted @ 2016-09-04 15:12
Piddnad
阅读(190)
评论(0)
推荐(0)

浙公网安备 33010602011771号