摘要: 这题其实挺经典的,看到求异或最大,显然想到的是线性基,不过这怎么维护?当然区间有关的东西都可以上线段树,区间修改时记录每个点的修改量k,然后合并线性基时再加入线性基。因为线性基是求一组极大线性无关组,所以查询a[i]^k组成的线性基等价于查询k∪a[i]。 #include<bits/stdc++. 阅读全文
posted @ 2019-06-15 13:08 hfctf0210 阅读(231) 评论(0) 推荐(0)
摘要: A 签到 #include<bits/stdc++.h> using namespace std; char s[200002]; int n,a[20]; int main() { scanf("%s",s+1); n=strlen(s+1); for(int i=1;i<=n;i++)a[s[i 阅读全文
posted @ 2019-06-15 11:30 hfctf0210 阅读(226) 评论(0) 推荐(0)