博客园 首页 私信博主 显示目录 隐藏目录 管理 动画
摘要: 给定长为$n$的序列$A$。求有多少$S$,满足$0\leq S<2^{60}$,且对于所有$i\in[1,n-1]$,$a[i]^{\wedge}S\leq a[i+1]^{\wedge}S$。 $n\leq20$。 阅读全文
posted @ 2018-10-13 22:11 SovietPower 阅读(194) 评论(0) 推荐(0) 编辑
摘要: "题目链接" 五维偏序,对每一维维护bitset,表示哪儿为1(比它大),然后5个bitset与起来就能得到答案了。 具体实现可以用5\ n个bitset,按排名搞个前缀和。 复杂度$O(n^2/w)$(本质是暴力的优化)。 cpp //1284ms 565MB include include in 阅读全文
posted @ 2018-10-13 17:10 SovietPower 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-10-13 07:55 SovietPower 阅读(197) 评论(2) 推荐(0) 编辑