The Cow Lexicon
来源:互联网 发布:淘宝怎么砍价 编辑:程序博客网 时间:2024/04/27 21:01
Description
Few know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 25 of the characters 'a'..'z'. Their cowmunication system, based on mooing, is not very accurate; sometimes they hear words that do not make any sense. For instance, Bessie once received a message that said "browndcodw". As it turns out, the intended message was "browncow" and the two letter "d"s were noise from other parts of the barnyard.
The cows want you to help them decipher a received message (also containing only characters in the range 'a'..'z') of length L (2 ≤ L ≤ 300) characters that is a bit garbled. In particular, they know that the message has some extra letters, and they want you to determine the smallest number of letters that must be removed to make the message a sequence of words from the dictionary.
Input
Line 2: L characters (followed by a newline, of course): the received message
Lines 3..W+2: The cows' dictionary, one word per line
Output
Sample Input
6 10browndcodwcowmilkwhiteblackbrownfarmer
- POJ3267 The Cow Lexicon
- 3267 The Cow Lexicon
- The Cow Lexicon
- POJ3267--The Cow Lexicon
- poj3267 The Cow Lexicon
- POJ3276---The Cow Lexicon
- The Cow Lexicon
- The Cow Lexicon(POJ_3267)
- poj3267 The Cow Lexicon
- POJ3267-The Cow Lexicon
- The Cow Lexicon
- The Cow Lexicon POJ
- POJ3276 The Cow Lexicon
- pku 3267 The Cow Lexicon
- poj 3267 The Cow Lexicon
- POJ 3267 The Cow Lexicon
- poj 3267 The Cow Lexicon
- POJ3267 The Cow Lexicon DP
- 表格设计基础
- 8款bitmap操作类
- dns 主从同步问题最终解决了
- C++的面向对象
- 纯忽悠程序员的开发要求(5):开发语言不重要,重要的是思想!
- The Cow Lexicon
- 学习OC2007 [四] 扩展帮助菜单?
- HashMap、LinkedHashMap 和 TreeMap的区别
- Android 开机启动
- sprintf函数
- 音视频方面一些单词的解释
- SQL常用语句一览(增删改查Easy)
- 在创建的线程中发送命令响应消息
- 经典人力资源配置