http://www.lydsy.com/JudgeOnline/problem.php?id=2084 题意:一个01串,求满足字符串0和1取反后,再将整个串反过来和原串一样的子串数目.(n<=500000) #include <bits/stdc++.h> using namespace std; const int N=500005; long long ans; int len[N<<1], n; char s[N<<1]; int main() { sc…
http://www.lydsy.com/JudgeOnline/problem.php?id=3052 题意:n个带颜色的点(m种),q次询问,每次询问x到y的路径上sum{w[次数]*v[颜色]},可以单点修改颜色.(n, m, q<=100000) #include <bits/stdc++.h> using namespace std; const int N=100005, M=100005; typedef long long ll; inline int getint()…