codeforces 1100F
传送门:http://codeforces.com/contest/1100/problem/F
题意:n个数,q个询问,每次询问区间异或最大值。
题解:普通的线段树会超时,我们考虑对每位有贡献的数最远是哪里,然后记录下来更新即可。
#include<bits/stdc++.h>
using namespace std;
int b[500005],ans[500005];
s...
原创
2019-01-15 20:19:58 ·
471 阅读 ·
0 评论