码迷,mamicode.com
首页 >  
搜索关键字:searching    ( 252个结果
zoj 3228 Searching the String(AC自动机)
题目连接:zoj 3228 Searching the String 题目大意:给定一个字符串,然后现在有N次询问,每次有一个type和一个子串,问说子串在字符串中出现几次,type 为0时为可重叠,为1时为不可重叠。 解题思路:不过没有type=1的限制,那么就是普通的AC自动机匹配问题,对于不可重叠问题,可以对于每个节点记录 一下上一次匹配到的pos,用当前匹配的i减掉...
分类:其他好文   时间:2014-11-10 21:55:20    阅读次数:311
[AC自动机] zoj Searching the String
题意: 给一个原串,再给n个串,每个串有属性,属性0代表可以重叠,1代表不可以重叠 问每个串出现了多少次 思路: 为了方便建立两个自动机(0的一个,1的一个) 然后可以重叠的很好做,以前都做过 不可重叠的话需要记录两个东西 len[i]代表每个串的长度,used[i]代表每个串在之前出现的位置,初始化-1 然后遍历到的时候对于当前位置 j, 必须j>=used[i]+len[i] ...
分类:其他好文   时间:2014-10-11 13:38:45    阅读次数:237
LA 3523 双连通分量+二分图判定
3523 - Knights of the Round TableTime limit: 4.500 secondsBeing a knight is a very attractive career: searching for the Holy Grail, saving damsels in ...
分类:其他好文   时间:2014-10-11 02:03:54    阅读次数:557
Searching an Element in a Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). How do you find an elemen...
分类:其他好文   时间:2014-10-09 14:22:13    阅读次数:332
ZOJ - 3228 Searching the String (AC自动机)
Description Little jay really hates to deal with string. But moondy likes it very much, and she's so mischievous that she often gives jay some dull problems related to string. And one day, moondy g...
分类:其他好文   时间:2014-10-05 15:19:28    阅读次数:279
cocos2dx3.2 android平台搭建开发环境纠错备忘录
平台:win32 + androidcocos2d版本:3.2搭建cocos2d-x android 常见问题:问题1:      Android platform not specified, searching a default one...Can't find right android-platform for project :"F:\cocos2d-x-3.1.1\tests\cpp...
分类:移动开发   时间:2014-09-29 22:19:31    阅读次数:290
jquery插件-select2(美化及增强普通select)
1.select2介绍 官网: http://ivaynberg.github.io/select2/ Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, a...
分类:Web程序   时间:2014-09-24 12:22:16    阅读次数:1379
[转]编译Android源代码常见错误解决办法
1. 编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lzPLATFORM_VERSION_CODENAME=AOSPPL...
分类:移动开发   时间:2014-09-19 23:53:06    阅读次数:523
libevent-2.0.so.5: cannot open shared object file: No such file or directory
centos安装软件后出现:./usr/local/bin/memcachedlibevent-2.0.so.5:cannotopensharedobjectfile:Nosuchfileordirectory解决libevent-2.0.so.5:cannotopensharedobjectfile:Nosuchfileordirectory解决方法1.用以下命令LD_DEBUG=libs/usr/local/bin/memcached-v查看寻找的路径..
分类:其他好文   时间:2014-09-18 16:45:44    阅读次数:172
ZOJ3228 Searching the String AC自动机
题意:给你一个文本串,其中模式串有两种模式,可以重复和不可以重复,分别有多少个模式串解题思路:在 Trie 里面多加几维数组来维护 重复和不重复的和,由于不够优美,差点超内存。解题代码: 1 // File Name: temp.cpp 2 // Author: darkdream 3 // ...
分类:其他好文   时间:2014-09-16 00:16:29    阅读次数:274
252条   上一页 1 ... 21 22 23 24 25 26 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!