后缀数组
文章平均质量分 80
Joefery
生命不息,战斗不止。
展开
-
后缀数组的DC3模版【后缀数组】
/* 之前一直用倍增法,发现有些题目卡倍增法,而DC3却能AC,所以顺便弄了 DC3的模版,看以后会不会用到,嗯,就是酱紫 提一些注意点:1.MAXN开n的十倍大小; 2.dc3(r,sa,n+1,Max+1);r为待后缀处理的数组,sa为存储排名位置的数组,n+1和Max+1 都和倍增一样原创 2016-10-12 14:03:29 · 2447 阅读 · 1 评论 -
URAL 1297 Palindrome【后缀数组】求最长回文子串
DescriptionThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Robotics”. «U.S. R原创 2016-10-11 03:22:27 · 882 阅读 · 0 评论 -
SPOJ 694 / SPOJ DISUBSTR Distinct Substrings【后缀数组】不相同的子串的个数
DescriptionGiven a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TEach test case consists of one string, whose length is OutputFor e原创 2016-10-09 20:56:25 · 437 阅读 · 0 评论 -
POJ 3261 Milk Patterns【后缀数组】可重叠的k次最长子串
DescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of mi原创 2016-10-09 15:02:12 · 553 阅读 · 0 评论 -
POJ 1743 Musical Theme 【后缀数组】最长不可重叠子串
DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this re原创 2016-10-08 16:24:51 · 461 阅读 · 0 评论