相关链接
题目传送门:https://www.codechef.com/problems/MAGICSTR
解题报告
官方题解是$O(n^2)$的
不过我们有了去年SCOI D1T3的人生经验之后
就可以再后面将整个串折叠,然后单个回文串可以拆成两个区间相等
最后再整体用并查集搞一搞
时间复杂度:$O(n \log n)$,不知道比标算高到哪里去了
题目传送门:https://www.codechef.com/problems/MAGICSTR
官方题解是$O(n^2)$的
不过我们有了去年SCOI D1T3的人生经验之后
就可以再后面将整个串折叠,然后单个回文串可以拆成两个区间相等
最后再整体用并查集搞一搞
时间复杂度:$O(n \log n)$,不知道比标算高到哪里去了
I went over this website and I believe you have a lot of good info , saved to my bookmarks (:.
Hi there just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.