摘要: "题目链接" 看到题目肯定首先会想到搜索。 然鹅数据范围$n include include define Open(s) freopen(s".in","r",stdin);freopen(s".out","w",stdout); define Close fclose(stdin);fclose 阅读全文
posted @ 2018-10-13 21:29 Qihoo360 阅读(159) 评论(0) 推荐(0) 编辑
摘要: "题目链接" 用权值线段树维护每个字母在$[l,r]$出现的次数,每次修改把每个字母在区间的出现次数记下来,然后清空这段区间,再按顺序插进去就好了。 时间复杂度$O(n\log n 26)$ (好久没写正常的维护和的线段树了,这次还要打清零的标记,能一遍写过,好开森) cpp include inc 阅读全文
posted @ 2018-10-13 20:54 Qihoo360 阅读(252) 评论(0) 推荐(0) 编辑
You're powerful!