
字典树&AC自动机
文章平均质量分 71
LBJHan
经历过就是财富
展开
-
DNA Prefix (字典树)
Given a set of n DNA samples, where each sample is a string containing characters from{A, C, G, T}, we are trying to find a subset of samples in the set, where the length of the longest common prefi原创 2017-10-04 10:32:19 · 2724 阅读 · 0 评论 -
Repository HDU - 2846(字典树)
Repository 题目链接:HDU - 2846 题意:给出P个字符串,找出其子...原创 2018-07-15 11:10:32 · 227 阅读 · 0 评论 -
Problem C HDU - 5687(字典树)
Problem C 题目链接:HDU - 5687涉及到字典树的增删查;#include <bits/stdc++.h>using namespace std;struct Trie{ int cnt; Trie* next[26]; ...原创 2018-07-15 12:27:43 · 212 阅读 · 0 评论 -
病毒侵袭 HDU - 2896(AC自动机)
病毒侵袭题目链接:HDU - 2896 题意:N个病毒编码,M个网站编码,问每个网站编码中包含那几种病毒;思路:多串匹配多串,很明显是AC自动机,而且是个模板题;之前写使用的指针写的,结果ML了,然后就找到了一个不用指针的模板,将指针改为了二维数组,这样就不会ML了;#include <bits/stdc++.h>using namespace std;int...原创 2018-09-03 15:44:00 · 253 阅读 · 0 评论