版本比较
考前必看
正文
增加 24 行删除 0 行
1234567819 行未改动字符串-- 是一个环形结构,就在s后面再拼接一个s,其中长度为n的就是s可能的所有状态- 多次比较字符串,用到哈希# Warning1. 如果认为自己写的是正解,不要认为自己能爆标,对照数据范围和时间限制推算代码应有的复杂度。2. 计数题,多造小数据对拍19 行未改动123456789101112131415161718192021222324252627282930313219 行未改动```cpp#include <bits/stdc++.h>// #define int long long#define pb push_backusing namespace std;/*n >= 1e7 use read, or cinwarn (long long or __int128_t, __int128_t needs wr)-std=c++14 -Wall -Wextracheck the time and the space*/signed main() {ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);return 0;}```初始化 fa[i], sz[i], dep[i](dep[fa] = 1), dis[i], vis[i]字符串-- 是一个环形结构,就在s后面再拼接一个s,其中长度为n的就是s可能的所有状态- 多次比较字符串,用到哈希- manacher数组开两倍# Warning1. 如果认为自己写的是正解,不要认为自己能爆标,对照数据范围和时间限制推算代码应有的复杂度。2. 计数题,多造小数据对拍19 行未改动