上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 94 下一页

2013年6月30日

【原创】AC自动机小结

摘要: 有了KMP和Trie的基础,就可以学习神奇的AC自动机了。AC自动机其实就是在Trie树上实现KMP,可以完成多模式串的匹配。 AC自动机 其实 就是创建了一个状态的转移图,思想很重要。 推荐的学习链接:http://acm.uestc.edu.cn/bbs/read.php?tid=4294http://blog.csdn.net/niushuai666/article/details/7002823http://hi.baidu.com/nialv7/item/ce1ce015d44a6ba7feded52d AC自动机专题训练链接:http://acm.h... 阅读全文

posted @ 2013-06-30 23:16 kuangbin 阅读(30653) 评论(5) 推荐(8) 编辑

ZOJ 3494 BCD Code(AC自动机+数位DP)

摘要: BCD CodeTime 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 decimal number using the common BCD encoding, each decimal digit is stored in a 4-bit nibble:Decimal: 0 1 ... 阅读全文

posted @ 2013-06-30 22:29 kuangbin 阅读(2495) 评论(0) 推荐(0) 编辑

HDU 3341 Lost's revenge(AC自动机+DP)

摘要: Lost's revengeTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2262Accepted Submission(s): 565Problem DescriptionLost and AekdyCoin are friends. They always play "number game"(A boring game based on number theory) together. We all kno 阅读全文

posted @ 2013-06-30 16:25 kuangbin 阅读(1605) 评论(0) 推荐(0) 编辑

2013年6月29日

HDU 2425 DNA repair (AC自动机+DP)

摘要: DNA repairTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 940Accepted Submission(s): 500Problem DescriptionBiologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the sake of simplicity, 阅读全文

posted @ 2013-06-29 22:14 kuangbin 阅读(645) 评论(0) 推荐(0) 编辑

HDU 2296 Ring (AC自动机+DP)

摘要: RingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1564Accepted Submission(s): 487Problem DescriptionFor the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's length should not e 阅读全文

posted @ 2013-06-29 21:12 kuangbin 阅读(671) 评论(0) 推荐(0) 编辑

2013年6月27日

POJ 1625 Censored!(AC自动机+DP+高精度)

摘要: Censored!Time Limit:5000MSMemory Limit:10000KTotal Submissions:6956Accepted:1887DescriptionThe alphabet of Freeland consists of exactly N letters. Each sentence of Freeland language (also known as Freish) consists of exactly M letters without word breaks. So, there exist exactly N^M different Freish 阅读全文

posted @ 2013-06-27 22:41 kuangbin 阅读(1756) 评论(3) 推荐(0) 编辑

HDU 2243 考研路茫茫——单词情结(AC自动机+矩阵)

摘要: 考研路茫茫——单词情结Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2687Accepted Submission(s): 744Problem Description背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。于是Lele想,如果背了N个词根 阅读全文

posted @ 2013-06-27 18:35 kuangbin 阅读(3477) 评论(3) 推荐(0) 编辑

POJ 2778 DNA Sequence(AC自动机+矩阵加速)

摘要: DNA SequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:9899Accepted:3717DescriptionIt's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For example, if a animal's DNA sequence contains segment AT 阅读全文

posted @ 2013-06-27 17:59 kuangbin 阅读(3277) 评论(3) 推荐(0) 编辑

ZOJ 4114 Detect the Virus(AC自动机)

摘要: Detect the VirusTime Limit:2 Seconds Memory Limit:65536 KBOne day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that made his poor computer slow and the virus was activated by a misoperation of opening an attachment of an email 阅读全文

posted @ 2013-06-27 15:23 kuangbin 阅读(959) 评论(0) 推荐(0) 编辑

2013年6月26日

HDU 2896 病毒侵袭(AC自动机)

摘要: 病毒侵袭Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7400Accepted Submission(s): 1945Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气, 阅读全文

posted @ 2013-06-26 19:44 kuangbin 阅读(4248) 评论(1) 推荐(1) 编辑

上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 94 下一页

导航

JAVASCRIPT: