8 teams scored 169 points on this task, for a maximum score of 37, an average score of 21 and a median score of 18.
Alessandro is coding his new 3D version of Pac-Man. The game board is described by a three-dimensional grid, some cells are blocked and the others are free. Pac-Man and the ghosts can move to any free cell sharing a face with the current cell. Alessandro instructed ghosts to move in a very simple way. If a ghost wants to move from cell A to cell B, it will repeat the following procedure until it reaches its destination or fails: (1) If the ghost can decrease the distance along the x axis (i.e. |A_x - B_x|) it will do so by moving one cell along the x axis; (2) otherwise if it can decrease the distance along the y axis (i.e. |A_y - B_y|) it will do so by moving one cell along the y axis; (3) otherwise if it can decrease the distance along the z axis (i.e. |A_z - B_z|) it will do so by moving one cell along the z axis; (4) otherwise it fails. Alessandro has three arrays X_i, Y_i and Z_i indexed from 0 to N-1 that describe the coordinates of the free cells...