• 2024-07-15G. Anya and the Mysterious String
    原题链接题解对于区间全部元素\(+x\)等价于对差分数组的\(d[l]+=x\),\(d[r+1]-=x\)也就是只修改了两个点如果存在回文串,要么是\(s[i]==s[i-1]\)要么是\(s[i]==s[i-2]\),所以我们可以用\(set\)维护23回文串的右端点code#include<bits/stdc++.h>#definelllonglon