标签 - 字典树

? 解题记录 ? ? LOJ ? ? 字典树 ?    2019-03-14 15:26:58    544    0    0
题目链接 题解:发现只需要分两段维护就可以了。 上一次排过序的前缀部分用字典树维护,并且对每一位记录nowxor" role="presentation">nowxornowxornow_xor表示按照当前的顺序,第i" role="presentation">iii位是否被翻转。后面的部分用一个前缀和维护。 这样的话,异或的时候维护偏移值,每一次排序我们就把后面的部分全部插入字典树,并且更新now&#x005F;xor" role="presentation">now_xornow_xornow\_xor。 #include<cstdio&g
? 解题记录 ? ? 字典树 ? ? Codeforces ?    2018-03-12 15:47:10    721    0    0
  Alice has a very important message M consisting of some non-negative integers that she wants to keep secret from Eve. Alice knows that the only theoretically secure cipher is one-time pad. Alice generates a random key K of the length equal to the message's length. Alice co