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!

VersenyVizsga portál

Kísérletek.hu

Matematika oktatási portál

I. 152. Write a program to recognize the following characters: see the Figure.

The file in.txt contains the characters to be recognized: white squares are encoded as 0's, while black squares as 1's. The input always contains letters of size 5×8, separated by two white columns. (There is no such white column before the first and after the last letter.) The input has more than one line, and every 8th line consists of entirely 0's as separators.

You should apply the following rules for recognition:

- If the input sign has a black dot at a certain position and some of the letters also have a black dot there, then the matching rate increases by 1.

- If the input sign has a black dot at a certain position and some of the letters do not have a black dot there, then the matching rate decreases by 1.

The input sign is identified as a certain letter, if the matching rate is at least 50% between the input and that letter. (Your output then is this letter.) If there are two candidates with equal matching rate, or the rate is less than 50%, your output should be a ``?''. The output file out.txt should contain the recognized letters or the question marks without spaces.

For example, if the input sign is the following:

then

so this character is recognized as letter ``B''.

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

(10 points)

Deadline expired on 19 March 2007.


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

Nagyon sok jó megoldás született, lássuk ezúttal Balambér Dávid /Budapest, Fazekas M. Főv. Gyak. Gimn./ programját: I152.PAS


Statistics on problem I. 152.
18 students sent a solution.
10 points:Balambér Dávid, Biró János, Bőle Pál, Czigler András, Földes Imre, Gilián Zoltán, Gombos Gergely, Györök Péter, Kovács 129 Péter, Polgárfi Bálint, Póta Kristóf, Ridinger Tamás, Szoldatics András, Vincze János.
8 points:3 students.
6 points:1 student.


  • Problems in Information Technology of KöMaL, February 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