随笔分类 - Trie
摘要:https://www.acwing.com/problem/content/3488/ 不同于一般的子数组异或和(异或前缀和+前缀树),本题对子数组长度作了限制。 依旧考虑维护一颗前缀树,记录前缀树的每个节点在当前状态是否可达。只是规定树内涉及的节点规模不大于m。 可以发现,我们在[x, x +
阅读全文
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 #define rg register 4 using namespace std; 5 const int N = 6e6 + 10; 6 int a[N]; 7 int t[N][2], cnt
阅读全文

浙公网安备 33010602011771号