Live2d Test Env

随笔分类 -  字符串

摘要:Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema 阅读全文
posted @ 2017-12-13 18:02 nimphy 阅读(275) 评论(1) 推荐(0)
摘要:后缀家族已知成员 后缀树 后缀数组 后缀自动机 后缀仙人掌 后缀预言 后缀Splay ? 后缀树是后缀数组和后缀自动机的祖先? 功能还是比较强大的,在回文串或者字典序方面还是有用处。 而且现在已经有了线性的建树方法。 (但其实我也没用过后缀树。)下面对比后缀自动机和后缀数组 单个字符串问题 不等号是 阅读全文
posted @ 2017-12-13 08:22 nimphy 阅读(2315) 评论(0) 推荐(3)
摘要:Background Before Albanian people could bear with the freedom of speech (this story is fully described in the problem "Freedom of speech"), another fr 阅读全文
posted @ 2017-12-11 09:42 nimphy 阅读(280) 评论(0) 推荐(0)
摘要:Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate 阅读全文
posted @ 2017-12-10 14:39 nimphy 阅读(472) 评论(0) 推荐(0)
摘要: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 strin 阅读全文
posted @ 2017-12-10 09:22 nimphy 阅读(329) 评论(0) 推荐(0)
摘要:Time limit per test: 1.0 seconds Memory limit: 256 megabytes Time limit per test: 1.0 seconds Memory limit: 256 megabytes Time limit per test: 1.0 sec 阅读全文
posted @ 2017-12-09 12:54 nimphy 阅读(366) 评论(0) 推荐(0)
摘要:Once upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was 阅读全文
posted @ 2017-12-06 17:31 nimphy 阅读(155) 评论(0) 推荐(0)
摘要:Problem Description In middle school, teachers used to encourage us to pick up pretty sentences so that we could apply those sentences in our own arti 阅读全文
posted @ 2017-11-25 20:19 nimphy 阅读(255) 评论(0) 推荐(0)
摘要:Problem Description 035 now faced a tough problem,his english teacher gives him a string,which consists with n lower case letter,he must figure out ho 阅读全文
posted @ 2017-11-25 16:47 nimphy 阅读(301) 评论(0) 推荐(0)
摘要:Problem Description Given a string S. K-string is the sub-string of S and it appear in the S at least K times.It means there are at least K different 阅读全文
posted @ 2017-11-25 12:14 nimphy 阅读(351) 评论(0) 推荐(0)
摘要:描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一段音乐旋律可以被表示为一段数构成的数列。 小Hi发现旋律可以循环,每次把一段旋律里面最前面一个音换到最后面就成为了原旋律的“循环相似旋律”,还可以对“循环相似旋律”进行相同的变换能继续得到原串的“循环相似旋律”。 小Hi对此产生了浓厚的兴趣,他有 阅读全文
posted @ 2017-11-24 22:20 nimphy 阅读(236) 评论(0) 推荐(0)
摘要:后缀自动机真的可以为所欲为。 前提是可以分组处理。 hash不够用,复杂度不够用,后缀自动机强无敌。 1,求字符串有多少不同字串,直接取每一组st的长度。见hihocoder1445。 2,如果需要求同一种串出现的次数,对同一后缀,用slink逆向推出,从长到短。如aab到aaab。见hihocod 阅读全文
posted @ 2017-11-24 15:18 nimphy 阅读(151) 评论(0) 推荐(0)
摘要:描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为一段数构成的数列。 现在小Hi想知道一部作品中所有长度为K的旋律中出现次数最多的旋律的出现次数。但是K不是固定的,小Hi想知道对于所有的K的答案。 输入 共一行,包含一个由小写字母构成的字符串S。字符串长度不超过 1000000 阅读全文
posted @ 2017-11-24 11:17 nimphy 阅读(384) 评论(0) 推荐(0)
摘要:重复旋律5 重复旋律5 时间限制:10000ms 单点时限:2000ms 内存限制:512MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为一段数构成的数列。 现在小Hi想知道一部作品中出现了多少不同的旋律? 输入 共一行,包含一个由小写字母构成的字符串。字符串长度不超过 阅读全文
posted @ 2017-11-22 18:16 nimphy 阅读(398) 评论(0) 推荐(0)
摘要:逆序单词 逆序单词 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在英文中有很多逆序的单词,比如dog和god,evil和live等等。 现在给出一份包含N个单词的单词表,其中每个单词只出现一次,请你找出其中有多少对逆序单词。 输入 第1行:1个整数,N,表示单词数量 阅读全文
posted @ 2017-11-19 19:42 nimphy 阅读(473) 评论(0) 推荐(0)
摘要:重复旋律3 重复旋律3 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为长度为 N 的数构成的数列。小Hi在练习过很多曲子以后发现很多作品中的旋律有共同的部分。 旋律是一段连续的数列,如果同一段旋律在作品A 阅读全文
posted @ 2017-11-19 18:58 nimphy 阅读(194) 评论(0) 推荐(0)
摘要:后缀数组一·重复旋律 后缀数组一·重复旋律 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为长度为 N 的数构成的数列。 小Hi在练习过很多曲子以后发现很多作品自身包含一样的旋律。旋律是一段连续的数列,相似 阅读全文
posted @ 2017-11-19 00:42 nimphy 阅读(293) 评论(0) 推荐(0)
摘要:#1618 : 单词接龙 #1618 : 单词接龙 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个单词字典和一个起始字母。小Hi需要从起始字母开始,每次再加上一个字母,生成长度为2、3、4……的单词;并且保证每个生成的单词都在字典中。 求能生成的最长单词的长度 阅读全文
posted @ 2017-10-30 22:14 nimphy 阅读(250) 评论(0) 推荐(0)
摘要:(transmit1) (transmit2) 先说一下后缀数组最基本的应用: Q1:一个串中某具体两个串的最大公共前缀是多少? A1:这不就是Height吗?用rmq预处理,再O(1)查询。 Q2:一个串中任意两个可重叠的重复最长子串是多长? A2:就是求任意两个后缀的最长公共前缀,而任意两个后缀 阅读全文
posted @ 2017-10-29 23:08 nimphy 阅读(337) 评论(0) 推荐(0)
摘要:Steam is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networ 阅读全文
posted @ 2017-10-25 09:04 nimphy 阅读(187) 评论(1) 推荐(0)