HarmonyOS
AC自动机 标签描述

题目链接:https://www.luogu.com.cn/problem/P3808 AC自动机模板题。 示例程序: include<bits/stdc.h> usingnamespacestd; constintmaxn=1e6+5; structNode{ intson[26],fail,id; Node(){} Node(int_id){ memset(son,0,sizeof(son)); fail=0; id=_id; } }tr[maxn]; intn,cnt,cc[maxn]; chars[maxn]; voidins(chars,intid){ intu=0...