摘要: Prim的板子题,没啥好讲的。相似题以及题解:https://blog.csdn.net/qq_41090676/article/details/86766394可以用来练手。#include #include const int INF=0x3f3f3f3... 阅读全文
posted @ 2019-02-06 16:19 xyee 阅读(110) 评论(0) 推荐(0)
摘要: 其实这就是mancher算法的板子题,贴个代码好了。思想请见我的另一篇博客:https://blog.csdn.net/qq_41090676/article/details/86768361#include #include const int maxn ... 阅读全文
posted @ 2019-02-06 15:43 xyee 阅读(169) 评论(0) 推荐(0)
摘要: 这题好像只能用mancher算法解决,速成马拉车算法。这个算法的核心思想就是,如果当前要维护的下标i小于上一次经维护后的max值,我们就取上一次得到的对称位置的回文半径。这个回文半径就是min(p[ id * 2 - i] , max-i),它的意思就代表了... 阅读全文
posted @ 2019-02-06 15:39 xyee 阅读(333) 评论(0) 推荐(0)