UVA 1449 - Dominating Patterns AC自动机
摘要:
因为有重复,结点用vector保存单词编号。#include#include#include#include#include#include#includeusing namespace std;const int MAX_NODE=15000;const int SIGMA_SIZE=26;struct ACAutomation{ int sz; int ch[MAX_NODE][SIGMA_SIZE]; int fail[MAX_NODE]; vector val[MAX_NODE]; void init() { sz=1; ... 阅读全文
posted @ 2013-10-18 16:48 BMan、 阅读(195) 评论(0) 推荐(0) 编辑