进食豪赤的后人 送上没用的对拍
查看原帖
进食豪赤的后人 送上没用的对拍
822439
lhz2022楼主2025/1/1 00:00

manacher球的的是以一个点为回文中心的最长回文串

也就是说,以这个点为中心,比他短的也得算上

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define debug() puts("I WILL AK")
#define N 100007

mt19937 rnd(time(0));
pair<int,int> g[N];
int ct;
#define M 10000
signed main(){
	//freopen(".in","r",stdin);
	freopen("1.in","w",stdout);
	int n=rnd()%M+1;
	int k=4;
	cout<<n<<' '<<k<<'\n';
	for(int i=1;i<=n;++i){
		cout<<(char)(rnd()%26+'a');
	}
	return 0;
}
2025/1/1 00:00
加载中...