![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
01字典树
_xgcxgc
一名热爱看番的OIer,
热爱OI,
热爱二次元,
热爱这个世界。
展开
-
BZOJ4260: Codechef REBXOR 01字典树
Description 给出一个长度为n的序列。 求出l1,r1,l2,r2,使得a[l1]^a[l1+1]…a[r1]+a[l2]^a[l2+1]…a[r2]最大,且1 <= l1 <= r1 < l2 <= r2 <= n Sample Input 5 1 2 3 1 2 Sample Output 6 这道题是01字典树的版题,你就用...原创 2018-04-22 21:19:14 · 264 阅读 · 0 评论 -
BZOJ3261: 最大异或和 可持久化01字典树
Description 给定一个非负整数序列{a},初始长度为N。 有M个操作,有以下两种操作类型: 1、Ax:添加操作,表示在序列末尾添加一个数x,序列的长度N+1。 2、Qlrx:询问操作,你需要找到一个位置p,满足l<=p<=r,使得: a[p] xor a[p+1] xor … xor a[N] xor x 最大,输出最大是多少。Sample Input 5 5 2 6 4 3原创 2018-04-22 22:32:14 · 248 阅读 · 0 评论