随笔分类 - 字符串
摘要:给定字符串 S,找出最长重复子串的长度。如果不存在重复子串就返回 0。 示例 1: 示例 2: 示例 3: 示例 4: 提示: https://www.nowcoder.com/questionTerminal/859d3e13ebb24e73861e03141bbe9cfb?from=14pdf
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1296 随手练习
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1409 没啥好说的,至今也不知道到底错在哪里了,看了discuss才过的
阅读全文
摘要:From beginning till end, this message has been waiting to be conveyed. For a given unordered multiset of n lowercase English letters ("multi" means th
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=6144 解法:一个简单的模拟
阅读全文
摘要:Vasily exited from a store and now he wants to recheck the total price of all purchases in his bill. The bill is a string in which the names of the pu
阅读全文
摘要:Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strings. He wrote it on a magical paper
阅读全文
摘要:While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest common subsequence. They solved it, and then Ehab challeng
阅读全文
摘要:时间过得好快啊,SHU计算机学院又有新的一批小朋友们进来了。2016级的同学想必也是非常喜欢计算机学院的,于是院长想测试一下大家对计算机的喜爱程度(院长大人别查我水表)。 院长给大家一行由大写字母(A-Z)和小写字母(a-z)组成的字符串,允许同学们在这个字符串里面任意挑选若干个字符,问最多可以组成
阅读全文
摘要:Description Nadeko's birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed on a
阅读全文
摘要:Description Mike has n strings s1, s2, ..., sn each consisting of lowercase English letters. In one move he can choose a string si, erase the first ch
阅读全文
摘要:In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text s
阅读全文