KöMaL - Középiskolai Matematikai és Fizikai Lapok
 English
Információ
A lap
Pontverseny
Cikkek
Hírek
Fórum

Rendelje meg a KöMaL-t!

MBUTTONS

VersenyVizsga portál

Kísérletek.hu

Matematika oktatási portál

I. 157. Regular readers of this Journal may remember our great detective, Watson from Problem I. 134. Those bad guys begin to sense that their business is endangered, so from now they encrypt their messages. Watson wants to prevent further robberies, therefore he should be able to decrypt their messages and encrypt his own ones. Encrypted messages contain only numbers separated by semicolons. Watson also knows that every message is signed by one of the wrongdoers. For example, the sequence

119; 25; 125; 69; 80; 118; 67; 147; 43; 21; 109; 29; 88; 128; 130; 72; 58; 156;

belongs to Hack Er. However, signatures are polymorphic, so

112; 32; 36; 158; 63; 135; 97; 117; 44; 20; 51; 87; 58; 158; 49; 153; 83; 131;

is also Hack Er's signature.

Your task is to find out how the gangster's encryption scheme works, then write a program to help Watson decode existing and encode new messages. Your program has three parameters, the first is either ``de'' or ``en'' (meaning decoding or encoding), the second parameter is the name of the file to read, while the third parameter is the name of the converted message file, as in the following example: i157 de secret.txt plaintext.txt.

The source code of your program (i157.pas, i157.cpp, \ldots) should be submitted.

(10 points)

Deadline expired on 15 May 2007.


Google Translation (Sorry, the solution is published in Hungarian only.)

Ha jól emlékszem, régen tettem közzé C++ megoldást, legyen akkor most ez:

Véges Márton, (Budapest, Fazekas Mihály Gimnázium) megoldása:

i157.cpp


Statistics on problem I. 157.
13 students sent a solution.
10 points:Balambér Dávid, Biró János, Czigler András, Danka Miklós András, Földes Imre, Györök Péter, Polgárfi Bálint, Ridinger Tamás, Szoldatics András, Véges Márton, Vincze János.
8 points:1 student.
5 points:1 student.


  • Problems in Information Technology of KöMaL, April 2007

  • Támogatóink:   Ericsson   Cognex   Emberi Erőforrás Támogatáskezelő   Emberi Erőforrások Minisztériuma   Nemzeti Tehetség Program    
    MTA Energiatudományi Kutatóközpont   MTA Wigner Fizikai Kutatóközpont     Nemzeti
Kulturális Alap   ELTE   Morgan Stanley