FR | EN
Quentin L. Meunier
Associate Professor in Computer Science at Sorbonne Université

Problem 1024

On a grid of 5 × 5 squares, a red target is placed randomly on one of the 25 squares, whose background is the same red. At first, the target is invisible.
After each shot, the target moves to an adjacent grid square (by one side), randomly.
The shooter is an expert, who never misses the target box, and seeks to reach the target in a minimum number of shots.
When he shoots a box, it becomes white. If the target comes on it, he will see it and will not miss it.


On a grid of 9 squares on 1, another target is placed. After each shot, it moves again to an adjacent square randomly. This time, the box does not change color and the target remains invisible unless it is reached.



Answer 0 if he cannot be sure.



I haven't done any program for this problem.




  • 1A. 13.
  • 2A. 14.