摘要: D. Bookshelves 注意:sum[ ii ]表示第 ii 块的所有数字和,因为有序,实际上就是一个区间和。 题解:二进制枚举答案ans,怎么枚举呢?从高位到低位放1,如果这个序列划分成m块后,能够sum[1] & sum[2] & ···· & sum[m] = ans,那么这位能够放1。 阅读全文
posted @ 2018-05-30 17:12 天之道,利而不害 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Some company is going to hold a fair in Byteland. There are nn towns in Byteland and mm two-way roads between towns. Of course, you can reach any town 阅读全文
posted @ 2018-05-30 12:27 天之道,利而不害 阅读(696) 评论(0) 推荐(0) 编辑