题目来源:http://poj.org/problem?id=1035
Spell checker
Time Limit: 2000MS |
Memory Limit: 65536K |
Total Submissions: 27099 |
Accepted: 9915 |
Description
You, as a member of a development team for a newspell checking program, are to write a module that will check the correctnessof given words using a known dictionary of all correct words in all theirforms.
If the word is absent in the dictionary then it can be replaced by correctwords (from the dictionary) that can be obtained by one of the followingoperations:
?deleting of one letter from the word;
?replacing of one letter in the word with an arbitrary letter;
?inserting of one arbitrary letter into the word.
Your task is to write the program that will find all possible replacements fromthe dictionary for every given word.
Input
The first part of the input file contains allwords from the dictionary. Each word occupies its own line. This part isfinished by the single character '#' on a separate line. All words aredifferent. There will be at most 10000 words in the dictionary.
The next part

这是一个关于编程竞赛POJ 1035的问题,要求编写一个程序,根据给定的词典检查单词的正确性。如果单词不在词典中,可以通过删除、替换或插入一个字母来找到可能的正确替代词。输入包含词典和要检查的单词列表,输出是每个单词的正确性或其可能的替代词。
最低0.47元/天 解锁文章
1842

被折叠的 条评论
为什么被折叠?



