摘要:
题意:求模式串在文本串中是否出现,出现则输出其编号; 思路:AC自动机模板题,结尾处标识字符串的ID即可; 注意:ASCII 码,数组需要开到130; 阅读全文
摘要:
/* * @Author: windystreet * @Date: 2018-07-26 09:22:19 * @Last Modified by: windystreet * @Last Modified time: 2018-07-26 14:01:48 */ #include using namespace std; #define X first #define Y sec... 阅读全文
摘要:
1 const int maxn = 1e5+7; 2 const int INF = 1edge; 12 vectorG[maxn]; 13 bool vis[maxn]; 14 int d[maxn]; 15 int cur[maxn]; 16 void init(int n){ 17 this->n = n; 18 ... 阅读全文