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!

ELTE

VersenyVizsga portál

Kísérletek.hu

Matematika oktatási portál

I. 161. Your task in this exercise is to simulate lightnings on the screen. The available display size is given as a command line parameter to your program (e.g. i161.exe 30 20 means 30 characters horizontally and 20 vertically). First you should fill the display area by random integers between 1 and 9. Then - by taking into account the three uppermost lines of the display - find the column(s) with the greatest sum of numbers: the lightning(s) will start from here. From the third line on, the lightning can propagate in three directions: horizontally, vertically, or diagonally down, by selecting the largest number from the appropriate neighbouring cell. (If there are more than one adjacent largest numbers, the lightning forks.) If it hits the (bottom or side) edge of the display area, the lighting discharges. Numbers along the path of the lightning should be changed to yellow. The example shows a 10×10 display area, now with letter ``V''s instead of yellow numbers.

The source code of your program (i161.pas, i161.cpp, ...) should be submitted.

(10 points)

Deadline expired on 15 June 2007.


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

Balambér Dávid 12. évf.(Budapest, Fazekas Mihály Főv. Gyak. Gimn.) megoldása.

I161.PAS


Statistics on problem I. 161.
12 students sent a solution.
10 points:Balambér Dávid, Danka Miklós András, Fábián András, Földes Imre, Gilián Zoltán, Györök Péter, Polgárfi Bálint, Ridinger Tamás, Szoldatics András, Véges Márton, Vincze János.
9 points:Kovács 129 Péter.


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