0% found this document useful (0 votes)
87 views1 page

INPUT SPECIFICATION. While Most Problems in This Contest Consist of Multiple Input Cases, This Input File Will

Diana Prince works as an intelligence officer, but finds her work decoding codes to be dull. Her current code involves an "invisible ink" code where each letter is represented by a number of spaces followed by an end-of-line marker. A space is a single end-of-line marker, while an end-of-line marker is represented by two end-of-line markers. Though a simple code, it hides the written message. The sample input is the phrase "HELP ME" and the output shows it encoded in the invisible ink format.

Uploaded by

Hasanzubyre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
87 views1 page

INPUT SPECIFICATION. While Most Problems in This Contest Consist of Multiple Input Cases, This Input File Will

Diana Prince works as an intelligence officer, but finds her work decoding codes to be dull. Her current code involves an "invisible ink" code where each letter is represented by a number of spaces followed by an end-of-line marker. A space is a single end-of-line marker, while an end-of-line marker is represented by two end-of-line markers. Though a simple code, it hides the written message. The sample input is the phrase "HELP ME" and the output shows it encoded in the invisible ink format.

Uploaded by

Hasanzubyre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

Problem 3Invisible Ink

As an army intelligence officer, Diana Prince sometimes has to crack codes. This sounds like exciting work, but, actually, for Diana, it is quite dull. The life of a female military professional is far from paradise. (In fact, Diana is not only the only high-ranking woman at her place of employment; she is also the token female in other organizations of which she is a member.) Rather than standing for the American eagle in her job, she sometimes feels more like a black canary. The particular code to which she is presently assigned took her all of about four seconds to crack. It is cute, though. The code is based completely on white space; it is as though the entire secret message were written in invisible ink. The input message consists entirely of capital letters, spaces, and <EOLN>'s. Each letter is encoded as a line of spaces followed by <EOLN>. A is encoded as one space; B is encoded as two spaces, and so forth. A space itself is encoded as a single <EOLN>. The <EOLN> is encoded as two <EOLN>'s. The primary advantage of the code is that paper copies of encoded messages cannot be analyzed. But, even so, it didn't take Diana long to break the code and lasso in the enemy agents. INPUT SPECIFICATION. While most problems in this contest consist of multiple input cases, this input file will contain exactly one secret message, though, of course, the message could contain multiple lines. The input message will be exactly in the format described above. OUTPUT SPECIFICATION. The output file should consist of the input message coded in invisible ink, exactly as described above. SAMPLE INPUT. HELPME<EOLN> <EOF> SAMPLE OUTPUT. <EOLN> <EOLN> <EOLN> <EOLN> <EOLN> <EOLN> <EOLN> <EOLN> <EOLN> <EOF>

You might also like