>Link
luogu P3501
>Description
给一个 0 / 1 0/1 0/1 串,求有多少子串(位置不同算不同子串)异或且翻转后与原串相同。
>解题思路
题目大意是有多少异或后的回文子串,那么直接马拉车就可以了。方便起见存一个数组 t o to to,表示每个字符在异或下对应的字符。
>代码
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define N 5000005
#define LL long long
using namespace std;
int n, m, to[N], mx;
char s