
后缀数组
nancheng58
这个作者很懒,什么都没留下…
展开
-
Codevs 1500 后缀排序(后缀数组)
1500 后缀排序 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 大师 Master 题目描述 Description 天凯是MIT的新生。Prof. HandsomeG给了他一个长度为n的由小写字母构成的字符串,要求他把该字符串的n个后缀(suffix)从小到大排序。 何谓后缀?假设字符串是S=S1S2……Sn,定义Ti=SiSi+1…原创 2017-03-21 11:45:33 · 313 阅读 · 0 评论 -
Poj 1743 Musical Theme(后缀数组+二分答案)
Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 28435 Accepted: 9604 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes t原创 2017-03-21 21:54:21 · 245 阅读 · 0 评论 -
UVALive 6869 Repeated Substrings(后缀数组)
String analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One interesting problem is to find how many substrings are repeated (at原创 2017-03-21 21:50:36 · 304 阅读 · 0 评论 -
Spoj 694 Distinct Substrings(后缀数组)
Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20; Each test case consists of one string, whose length is <= 1000 Output F原创 2017-03-21 21:39:27 · 191 阅读 · 0 评论 -
Poj 3261 Milk Patterns(后缀数组+二分答案)
Milk Patterns Case Time Limit: 2000MS Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that althou原创 2017-03-21 21:26:27 · 488 阅读 · 0 评论 -
Poj 3294 Life Forms(后缀数组+二分答案)
Life Forms Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 15422 Accepted: 4537 Description You may have wondered why most extraterrestrial life forms resemble humans原创 2017-03-21 21:28:32 · 465 阅读 · 0 评论 -
Bzoj 1031: [JSOI2007]字符加密Cipher(后缀数组)
1031: [JSOI2007]字符加密Cipher Time Limit: 10 Sec Memory Limit: 162 MB Description 喜欢钻研问题的JS同学,最近又迷上了对加密方法的思考。一天,他突然想出了一种他认为是终极的加密办法 :把需要加密的信息排成一圈,显然,它们有很多种不同的读法。例如下图,可以读作: JSOI07 SOI07J原创 2017-03-21 21:22:38 · 284 阅读 · 0 评论 -
Uoj #35. 后缀排序(后缀数组)
35. 后缀排序 统计 描述 提交 自定义测试 这是一道模板题。 读入一个长度为 nn 的由小写英文字母组成的字符串,请把这个字符串的所有非空后缀按字典序从小到大排序,然后按顺序输出后缀的第一个字符在原串中的位置。位置编号为 11 到 nn。 除此之外为了进一步证明你确实有给后缀排序的超能力,请另外输出 n−1n−1 个整数分别表示排序后相邻后缀的原创 2017-03-21 11:49:00 · 329 阅读 · 0 评论 -
Codevs 3160 最长公共子串(后缀数组)
3160 最长公共子串 时间限制: 2 s 空间限制: 128000 KB 题目等级 : 大师 Master 题目描述 Description 给出两个由小写字母组成的字符串,求它们的最长公共子串的长度。 输入描述 Input Description 读入两个字符串 输出描述 Output Description 输出最长公共子串的长度原创 2017-03-21 11:46:33 · 409 阅读 · 0 评论 -
Ural1297 最长回文子串(后缀数组+RMQ)
/*源程序丢失QWQ.就不粘代码了.大体做法是把串反转然后连接.做一遍后缀数组.对height做一遍rmq.然后对于每个位置的奇偶分别判断,记下pos.注意求的是[l+1,r]的height值.*/原创 2017-03-21 22:26:41 · 313 阅读 · 0 评论