月度归档: 2022 年 3 月

2 篇文章

代码源每日一题Div1打卡
101 二分答案 思路如题 #include <iostream> #include <stdio.h> #include <algorithm> using namespace std; const int N=1e5+10; int n; long long k,minn,ma…
马拉车算法(manachar)
manachar (马拉车算法) 回文: 回文的定义十分简单,判断回文串的方法也很简单。对于一个字符串,只需要从他的最中心向两边扩展就足够了,可以将它称之为中心扩展法,我们的马拉车算法也是从中心扩展法扩展而来。 马拉车算法的运用之处: 对于一个字符串,询问它的字串中长度最大的回文串的长度。 显然,我…