码迷,mamicode.com
首页 >  
搜索关键字:后缀数组    ( 1340个结果
[知识点]后缀数组
// 本文部分内容参照刘汝佳《算法竞赛入门经典训练指南》,特此说明。1、前言 趁着这几天上午,把后缀数组大致看完了。这个东西本身的概念可能没太大理解问题,但是它所延伸出来的知识很复杂,很多,还有它的两个兄弟——后缀树,后缀自动机,编起来都不是盖的。2、概念 前面曾经提到过Aho-Corasick.....
分类:编程语言   时间:2015-08-20 01:11:26    阅读次数:176
[JSOI2007][BZOJ1031] 字符加密Cipher|后缀数组
1031: [JSOI2007]字符加密CipherTime Limit:10 SecMemory Limit:162 MBSubmit:4296Solved:1746[Submit][Status][Discuss]Description喜欢钻研问题的JS 同学,最近又迷上了对加密方法的思考。一天...
分类:编程语言   时间:2015-08-19 23:16:34    阅读次数:216
HDOJ 题目3518 Boring counting(后缀数组,求不重叠重复次数最少为2的子串种类数)
Boring counting Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2253    Accepted Submission(s): 924 Problem Description 035 now fac...
分类:编程语言   时间:2015-08-19 01:59:41    阅读次数:198
字符串中连续出现最多的子串 & 字符串中最长重复子串
字符串中连续出现最多的子串 & 字符串中最长重复子串     字符串中连续出现最多的子串 & 字符串中最长重复子串,这两个问题都可以用后缀数组来表示,至于后缀数组可以参考编程珠玑P156;后缀数组就是定义一个数组指针,分别指向字符串中的对应位置,如下: a b c a b c a b c d e .substr[0] b c a b c a b c d e ....subst...
分类:其他好文   时间:2015-08-18 22:53:54    阅读次数:234
SPOJ 题目694 Distinct Substrings(后缀数组,求不同的子串个数)
DISUBSTR - Distinct Substrings no tags  Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T Each test case consists of one st...
分类:编程语言   时间:2015-08-18 22:48:38    阅读次数:154
POJ 题目2774 Long Long Message(后缀数组,求最长公共子串长度)
Long Long Message Time Limit: 4000MS   Memory Limit: 131072K Total Submissions: 23696   Accepted: 9705 Case Time Limit: 1000MS Description The little cat is majoring i...
分类:编程语言   时间:2015-08-18 19:25:21    阅读次数:123
POJ 题目3261 Milk Patterns(后缀数组求最长重叠至少k次的子串长度)
Milk Patterns Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 12128   Accepted: 5387 Case Time Limit: 2000MS Description Farmer John has noticed that th...
分类:编程语言   时间:2015-08-18 19:18:24    阅读次数:132
POJ 题目1743 Musical Theme(后缀数组,求一个串中最长不重叠重复子串)
Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 21826   Accepted: 7467 Description A musical melody is represented as a sequence of N (1<=N<=2000...
分类:编程语言   时间:2015-08-18 14:14:55    阅读次数:140
bzoj4199: [Noi2015]品酒大会
题面见http://uoj.ac/problem/131一道后缀数组题先求出height,然后从大到小枚举每个height。然后对于每个height值,两端的集合中任意一对后缀的LCP都是这个height。我们统计答案之后合并两端的集合,用并查集维护即可。 1 #include 2 #include...
分类:其他好文   时间:2015-08-16 12:11:18    阅读次数:97
spoj 1811 LCS - Longest Common Substring (后缀自动机)
spoj 1811 LCS - Longest Common Substring 题意: 给出两个串S, T, 求最长公共子串。 限制: |S|, |T| 思路: dp O(n^2) 铁定超时 后缀数组 O(nlog(n)) 在spoj上没试过,感觉也会被卡掉 后缀自动机 O(n) 我们考虑用SAM读入字符串B; 令当前状态为s,同时最大匹配长度为len;...
分类:其他好文   时间:2015-08-14 21:29:35    阅读次数:121
1340条   上一页 1 ... 91 92 93 94 95 ... 134 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!