Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Shift Cipher
Description A A To make the cipher more difficult to understand, spaces and all punctuations are removed from the message before encryption. For example, assume that
is encrypted into the cipher:
For simplicity, we assume that a message is recovered if spaces are inserted into the text so that each word separated by spaces is a word in the dictionary. Given a cipher text write a program to recover the message. You may assume that each cipher is less than 256 characters, and each word used in the message appears in the dictionary. The dictionary is located at the very beginning of the input, succeeded by a single blank line. This dictionary is plain text; each line contains a word. There are words with capital or special letters in the dictionary. These words will not be used in our system. It is not necessary to check if the sentence is grammatically correct or not. 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. Input The input data is a set of ciphers. Each cipher is written in a line. A line containing only the character Output The output is the key Sample Input we will meet at midnight zhzloophhwdwplgqljkw lowder 0 Sample Output k=3: we will meet at midnight NO SOLUTIONS Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator