题本身挺水,就是有点坑人,字典大概10W个,用Trie树存会MLE,用map存就好,字符串有26种变化,枚举一遍,输出单词数最小的,n^2 的dp解决,还有一个坑,The answer will be considered correct if no adjacent words are single character and the average number of characters in the words is greater than 2. 加个特判就行了
大概就是这样
Memory: 9988K Time: 1188MS