English Információ A lap Pontverseny Cikkek Hírek Fórum

Rendelje meg a KöMaL-t!

Kifordítható

tetraéder

VersenyVizsga portál

Kísérletek.hu

Matematika oktatási portál

I. 140. Prepare a program to simulate falling characters on the screen. Your program should read the initial state from a file and print this text on the screen. Then in every tenth of a second a random character should be chosen and moved one line below, replacing the original position of the letter with a space. A letter can not fall further down if there is a non-space character just below it or if it hit the bottom of the screen.

The name of the input file is i140.txt. The file contains 25 lines, each line has 80 characters containing only letters, spaces or numerals.

The simulation ends when no more characters can fall. Your program then should print the message Every character has fallen off'' in the upper left corner and wait for Enter to be pressed.

The source code (i140.pas, i140.cpp, ...) should be submitted.

(10 points)

Deadline expired on 15 November 2006.

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

Az alábbi file tartalmazza a mintamegoldást, illetve a megoldások ellenőrzéséhez használt tesztadatot.

Statistics on problem I. 140.
 25 students sent a solution. 10 points: Biró János, Danka Miklós András, Fehér András, Györök Péter, Hunyady Márton, Kiss Dániel Miklós, Kovács 129 Péter, Polgárfi Bálint, Szoldatics András, Véges Márton, Vincze János. 9 points: Balambér Dávid. 8 points: 2 students. 7 points: 2 students. 4 points: 3 students. 2 points: 2 students. 0 point: 4 students.

• Problems in Information Technology of KöMaL, October 2006

•  Támogatóink: Morgan Stanley