字符串
yesky_
这个作者很懒,什么都没留下…
展开
-
KMP
作用是找大串里匹配的小串的位置 理解好难,先讲一下原理。找目前字符串的Border:是一个字符串最长的,能跟真后缀相同的真前缀的长度。 比如ABCDABCD 从1号到八号 Border分别是00001234.。 如何求Border: 我们以ABABAC为例 用肉眼明显知道 001230 我们知道如果前面的字符串对称,只需要把当前字符和前面字符对称总数+1比较,如果继续对称,那么对称...原创 2019-01-15 22:26:48 · 119 阅读 · 0 评论 -
字符串常用函数
https://blog.csdn.net/fdqw_sph/article/details/54233971 提取子串和字符串连接 题取子串的函数是:substr(),形式如下: s.substr();//返回s的全部内容 s.substr(11);//从索引11往后的子串 s.substr(5,6);//从索引5开始6个字符 把两个字符串结合起来的函数是+。 输入输出操作 1.>&g...原创 2019-01-15 22:32:16 · 117 阅读 · 0 评论 -
The Festive Evening
题目描述 It's the end of July – the time when a festive evening is held at Jelly Castle! Guests from all over the kingdom gather here to discuss new trends in the world of confectionery. Yet some of the ...原创 2019-01-16 18:51:47 · 106 阅读 · 0 评论 -
3.8——K-th Substring
题目描述 You are given a string s. Among the different substrings of s, print the K-th lexicographically smallest one. A substring of s is a string obtained by taking out a non-empty contiguous part in s...原创 2019-03-09 17:41:04 · 217 阅读 · 0 评论 -
Little Sub and Enigma
Little Sub builds a naive Enigma machine of his own. It can only be used to encrypt/decrypt lower-case letters by giving each letter a unique corresponding lower-case letter. In order to ensure the ac...原创 2019-05-05 17:08:35 · 127 阅读 · 0 评论