ac自动机模板 知道的勿喷=.=
摘要:
#include#includeusing namespace std;const int max_node=101;const int son_num=26;const int modn=2009;class ACAutomaton{ private: //每个节点的儿子,即当前节点的状态转移 int trie[max_node][son_num]; //记录题目给的关键数据 int val[max_node]; //fail指针 int fail[max_node]; //队列,用于广搜计算fail指针 int Q[max_node];... 阅读全文
posted @ 2013-11-10 20:53 Hungry3 阅读(172) 评论(0) 推荐(0)
浙公网安备 33010602011771号