Editorial for IOI '97 P3 - The Toxic iShongololo
Submitting an official solution before solving the problem yourself is a bannable offence.
A 3D array is created to represent the "fruit" which the iShongololo is going to be eating. This array is then initialised to all being edible.
The iShongololo starts eating at the block
On reaching a side, it calculates whether the iShongololo can turn without violating rules and stops eating adjacent blocks. It will then turn and continue this process. When no further horizontal blocks can be eaten, the iShongololo will move downwards
Once there are no further edible blocks, the programme ends.
To further optimise the solutions, the solutions are run from
Comments