Internet Problem Solving Contest

IPSC 2007

Problem K – Know Your Crypto

Note to self: never make problem statements at the last possible moment.

In this problem your task is to examine the given input file, make some sense out of it and recover the correct answer. For each input file the answer is a single English word.

We will not tell you anything about the easy input, it is already easy enough.

And we have to apologize for the hard problem, it is probably impossible to solve. This task was prepared at the last possible moment, and we didn't have any idea what to do with the hard input. So finally we decided that we will just randomly change all the letters of the plain text. This is the program we used:

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <time.h>
char ch;

char change(char ch) { return 'a'+((ch-'a'+(rand()%26))%26); }

int main() {
  while (scanf("%c",&ch)==1) if (isalpha(ch)) printf("%c",change(tolower(ch)));
  return 0;

Of course, this is not completely random, the rand() function is only returning pseudo-random values. If you think it might help you, our machine used the rand() implementation from the GNU C library, version 2.4. We even wrote down some additional notes on how this pseudo-random function works. Feel free to spend your valuable contest time reading them :)

Output specification

After finding the solution for an input (a single English word), create an output file with a single line containing this word in lowercase.



the answer is a male cow



Problemsetter(s): misof
Contest-related materials: misof, g00ber