img
Czech Technical University in Prague
ACM ICPC sponsored by IBM
Central Europe Regional Contest 2011
Contest Ciphers
Cryptography is an exciting discipline, don't you think? Since ancient times, people always felt
the need to protect the content of their sensitive messages. Thank to cryptography, a message
content (so-called plaintext ) can be encrypted (enciphered ) into its encoded form (ciphertext )
that may be then transferred across insecure channels because it is unreadable for anyone except
the intended recipient, who will decrypt (decipher ) the message into the plaintext again. Good
algorithms are parametrized by keys -- even if we know the algorithm, it is still impossible to
read the message without the proper key.
Yesterday, some of you have tried a couple of non-traditional ways to hide the meaning of a text
during our CERC Cipher Contest. Today, instead of the Cipher Contest, we have prepared a set
of Contest Ciphers and other cryptography-related problems you are to solve algorithmically.
Your programs can be written in C, C++, or Java programming languages. The choice is yours
but you will be fully responsible for the correctness and efficiency of your solutions. We need
the correct answer produced in some appropriate time. Nothing else matters. You may choose
any algorithm and any programming style.
All programs will read one single text file from the standard input. The results will be written
to the standard output. Input and output formats are described in problem statements and
must be strictly followed. Each text line (including the last one) should be always terminated
by a newline character ("\n"), which is not considered a part of that line.
You are not allowed to use any other files, communicate over network, create threads or processes,
or do anything else that could jeopardize the competition.
Happy enciphering and deciphering!
This problem set consists of 11 sheets of paper (including this one) and it contains 10 problems.
Please make sure you have the complete set.