
AC自动机
u010660276
这个作者很懒,什么都没留下…
展开
-
AC自动机+uva1449
AC自动机适用于多模式串#include#include#include#include#include#includeusing namespace std;const int maxn=1000000;int n;char text[1000010];char p[155][80];map m;struct AC{ int ch[maxn][30];原创 2014-03-25 22:39:02 · 573 阅读 · 0 评论 -
AC自动机+记忆化搜索uva1399Puzzle
Jisung is the student representative of the Department of Computer Engineering in ACM University. A few days later, the annual festival will be held for the students in the department. He is preparing原创 2014-09-10 14:38:08 · 536 阅读 · 0 评论 -
AC自动机+状态压缩+记忆化搜索+uva1076
You are the computer whiz for the secret organization known as the Sneaky Underground Smug Perpetrators of Evil Crimes and Thefts. The target for SUSPECT's latest evil crime is their greatest foe, t原创 2014-09-13 21:53:32 · 697 阅读 · 0 评论 -
AC自动机(矩阵匹配)uva11019
Problem HMatrix MatcherInput: Standard InputOutput: StandardOutput Given an N * M matrix, your task is to find the number of occurences of an X * Y pattern. InputThe first line contai原创 2014-09-02 18:57:19 · 485 阅读 · 0 评论 -
AC自动机+矩阵(构造字符串 好)hdu2243
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-04 19:33:54 · 500 阅读 · 0 评论 -
DFA+dp+zoj2337
Non Absorbing DFATime Limit: 5 Seconds Memory Limit: 32768 KB In the theory of compilers and languages finite state machines, also known asfinite automata arewidely used. Deterministi原创 2014-10-03 15:15:50 · 534 阅读 · 0 评论 -
AC自动机(good)codeforces86C
C. Genetic engineeringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output"Multidimensional spaces are completel原创 2014-10-03 22:49:09 · 995 阅读 · 0 评论 -
AC自动机(hdu4057)
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2015-01-09 21:28:43 · 473 阅读 · 0 评论 -
AC自动机(出现的模式串有多少)hdu3695
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2015-01-05 22:39:30 · 464 阅读 · 0 评论 -
hdu - 4511 小明系列故事——女友的考验(AC自动机+DP)
小明系列故事——女友的考验Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 910 Accepted Submission(s): 207Problem Description 终于放寒假了,小明要和女朋友一起去看电影。这天,女朋友原创 2015-07-08 14:37:00 · 678 阅读 · 0 评论 -
hdu 4758 - Walk Through Squares(AC自动机+DP)现场赛
Walk Through SquaresTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1046 Accepted Submission(s): 318Problem Description On原创 2015-07-08 15:26:15 · 407 阅读 · 0 评论 -
ZOJ - 3494 BCD Code(AC自动机+数位DP)
BCD Code Time Limit: 5 Seconds Memory Limit: 65536 KBBinary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. To encode a decim原创 2015-07-08 11:47:59 · 663 阅读 · 0 评论 -
zoj 3545 - Rescue the Rabbit(AC自动机+dp)
Rescue the RabbitDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabbits to Noah’s Ark, or there are no rabbits any more.A原创 2015-08-10 16:51:25 · 534 阅读 · 0 评论 -
AC自动机+hdu3341
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-09 19:44:06 · 602 阅读 · 0 评论 -
AC自动机+状态压缩dp+BFS求最短路+hdu3247
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-09 20:04:15 · 584 阅读 · 0 评论 -
AC自动机uva11468
详见《训练指南》// UVa11468 Substring// Rujia Liu#include#include#include#include#include#includeusing namespace std;const int SIGMA_SIZE = 64;const int MAXNODE = 500; // 结点总数const int MAXS = 20原创 2014-03-26 22:54:51 · 511 阅读 · 0 评论 -
AC自动机模板(数组+指针)hdu2222
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-08-20 17:01:05 · 1418 阅读 · 2 评论 -
AC自动机讲解
转自:飘过的小牛AC自动机简介: 首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有字典树Trie和KMP模式匹配算法的基础知识。KMP算法是单模式串的字符匹转载 2014-08-20 15:27:23 · 397 阅读 · 0 评论 -
AC自动机(模板题)hdu2896
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-08-20 21:07:06 · 478 阅读 · 0 评论 -
AC自动机hdu3068
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-08-20 21:40:42 · 510 阅读 · 0 评论 -
AC自动机+DP+大数poj1625
Language:DefaultCensored!Time Limit: 5000MS Memory Limit: 10000KTotal Submissions: 8102 Accepted: 2191DescriptionThe alphabet of Freeland consists of exac原创 2014-09-04 22:29:56 · 641 阅读 · 0 评论 -
AC自动机+DP(总结)+hdu2457
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-05 11:39:48 · 567 阅读 · 0 评论 -
AC自动机zoj3228
ZOJ Problem Set - 3228Searching the StringTime Limit: 7 Seconds Memory Limit: 129872 KBLittle jay really hates to deal with string. But moondy likes it very much, and she's so mischie原创 2014-09-05 14:50:08 · 480 阅读 · 0 评论 -
AC自动机+DP+hdu2296
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-06 09:46:28 · 410 阅读 · 0 评论 -
uva11019
// UVa11019 Matrix Matcher// Rujia Liu#include#include#include#include#includeusing namespace std;const int SIGMA_SIZE = 26;const int MAXNODE = 10000 + 10;void process_match(int pos, int v原创 2014-08-21 22:16:09 · 528 阅读 · 0 评论 -
AC自动机+状态压缩DP+hdu2825
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum | DiscussStatistical ChartsProblem ArchiveRealtime Judge Statu原创 2014-09-07 10:17:29 · 541 阅读 · 0 评论 -
AC自动机构造字符串(好)poj2778
Language:DefaultDNA SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11630 Accepted: 4439DescriptionIt's well known that DNA Sequence is原创 2014-08-22 21:38:33 · 510 阅读 · 0 评论 -
2015 Multi-University Training Contest 8 (莫对算法+AC自动机+DP)
DanganronpaProblem DescriptionDanganronpa is a video game franchise created and developed by Spike Chunsoft, the series’ name is compounded from the Japanese words for “bullet” (dangan) and “refutation原创 2015-08-16 15:50:06 · 968 阅读 · 0 评论