Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?

Problem I. 233. (February 2010)

I. 233. In this exercise we do treasure hunting by using a spreadsheet application.

The game takes place on a 10×10 board. 5 cells contain treasure. You control a robot on the board and your aim is to collect as many pieces of treasure as possible. The robot grabs the treasure if it occupies a treasure cell. You, the player, see all the treasures in advance. Your task is to give a single command line to the robot so that it can collect as many treasures as possible.

Coordinates of the starting position of the robot are given in two cells. The robot, in its default position, faces downwards. The string written in cell A1 controls the movement and direction of the robot. The table below explains the control characters.

e 1 step forward in the actual direction
j Turn right by 90 degrees (compared to the actual direction)
b Turn left by 90 degrees (compared to the actual direction)

You should write functions into the cells whose results upon evaluation are useful for conditional formatting, for setting patterns and background colors and displaying events.

Coordinates of the treasure cells are given in 5×2 cells of the sheet. Treasure cells should be denoted by red cells, while path of the robot according to the command line in cell A1 is black. Treasure cells should not change color when the robot finds them.

You should display the number of treasures the robot acquired by using the actual command line.

Copyable formulae should compute the position and direction of the robot. During the play it is not necessary to check whether the robot leaves the board or not. You should not use macros or program modules. All (auxiliary) computations should be clearly visible, do not hide anything.

Your spreadsheet (i233.xls, i233.ods, ...) together with a short documentation (i233.txt, i233.pdf, ...) -- also describing the name and version number of the spreadsheet application, further a brief description of your solution -- should be submitted in a compressed file (i233.zip).

(10 pont)

Deadline expired on March 10, 2010.


Statistics:

7 students sent a solution.
10 points:Balla Attila, Horváth 135 Loránd, Janosov Milán, Pap 999 Dávid, Paróczi Gergő, Szabó 928 Attila.
9 points:Barta 111 János.

Problems in Information Technology of KöMaL, February 2010