总结20220208
上午看了kmp算法的思想,不是很懂,下午又查了一些kmp的模板,还不是很清楚具体的步骤,但是在模板的基础上做了一个题。明天再仔细看看细节。
Compress Words
题目描述
Amugae has a sentence consisting of nn words. He want to compress this sentence into one word. Amugae doesn't like repetitions, so when he merges two words into one word, he removes the longest prefix of the second word that coincides with a suffix of the first word. For example, he merges "sample" and "please" into "samplease".
Amugae will merge his sentence left to right (i.e. fir
总结20220208最先出现在Python成神之路。
共有 0 条评论