码迷,mamicode.com
首页 >  
搜索关键字:ac自动机dp    ( 151个结果
ZOJ3545---Rescue the Rabbit(AC自动机+dp)
Dr. 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 rabbit’s genes c...
分类:其他好文   时间:2015-04-20 18:37:55    阅读次数:199
hdu4511---小明系列故事——女友的考验(AC自动机+dp)
小明系列故事——女友的考验 Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 863 Accepted Submission(s): 192Problem Description   终于放寒假了,小明要和女朋友一起去看电影。这天,女...
分类:其他好文   时间:2015-04-20 17:06:34    阅读次数:147
WHU1572---Cyy and Fzz (AC自动机+dp)
Description As Cyy and Fzz are both busy repairing the network, Sama feel a little boring because it’s he who select Teemo during that game. Of cause his Teemo will stay alive since he has used the su...
分类:其他好文   时间:2015-04-20 15:02:15    阅读次数:178
[后缀数组+dp/AC自动机+dp+线段树] hdu 4117 GRE Words
题意: 给你N个字符串, N(1 问不打乱字符串顺序,从中取若干个字符串,使得前一个串是后一个串的子串,求满足前面调条件的字符串值得和最大,求这个值。 思路: 其实就是一个很明显的dp。 dp[i]代表以第i个字符串结尾的最大权值。 但是就是子串这个问题怎么处理。 由于这题数据比较水可以用后缀数组处理这个问题。 将所有字符串拼接,做sa。 每次在height数组里往上和往下寻找...
分类:编程语言   时间:2015-04-17 13:51:50    阅读次数:174
hdu4758---Walk Through Squares(AC自动机+dp)
Problem DescriptionOn the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Military Engineering Institute before, queue phalanx is a special...
分类:其他好文   时间:2015-04-16 17:47:17    阅读次数:181
NOJ1222-English Game(AC自动机+dp)
问题描述This English game is a simple English words connection game. The rules are as follows: there are N English words in a dictionary, and every word has its own weight v. There is a weight if the corre...
分类:其他好文   时间:2015-04-16 14:24:45    阅读次数:185
[AC自动机+dp+高精度] poj 1625 Censored!
题意: 给一个长度为N的字符串,表示有N个字符可用。 再给p个不能含有的病毒串。 为你长度为M的串不含有任意一个病毒串的方案数。 思路: 由于不需要取模,50^50需要用到高精度。 因为题目的字符串大于32所以可以直接scanf输入。 输入完map一下就好了。 就是裸的自动机dp了。 代码: #include"stdio.h" #include"algorithm" #incl...
分类:其他好文   时间:2015-04-14 11:17:20    阅读次数:113
【BZOJ 3530】 [Sdoi2014]数数
AC自动机上的dp~...
分类:其他好文   时间:2015-04-10 11:38:40    阅读次数:216
【BZOJ】【1030】【JSOI2007】文本生成器
AC自动机/DP Orz ZYF 玛雅快要省选了,赶紧复(xue)习(xi)一下AC自动机…… 其实在AC自动机上DP并没有当初想的那么复杂……就是把DP的转移关系换成了AC自动机上的边而已(不过这题好像搞成了Trie图?) 1 /*******************************...
分类:Web程序   时间:2015-04-05 23:17:59    阅读次数:195
HDU 4511
SHIT,SHIT,SHIT,SHIT,SHIT...这道题可以使用AC自动机+DP来解决。也就是用非法路径建立TRIE图,然后从trie[root][1]点开始广搜DP即可。千万要注意一点,题目里有说:小明每次走的时候只能走到比当前所在点编号大的位置因为这个WA了无限次。。。#include #i...
分类:其他好文   时间:2015-03-20 18:34:25    阅读次数:145
151条   上一页 1 ... 8 9 10 11 12 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!