Chris, the penguin, is stuck in a prison. The prison can be seen as a square grid, and one of the grid contains the key to open the door. As Chris is a forgetful penguin, he needs to mark which square he had checked such that he wouldn't keep repeatedly checking the square. He proudly says his plan:
On the square I am standing, I will check if there's a key. If yes, then I succeeded. Else, I mark it as X and move forward. Once I hit the wall or the square in front of me is marked, I turn right and continue this process.
Is Chris' plan ingenious? Below is the configuration of the prison and the blue arrow indicates Chris' initial position and direction. With Chris' plan, how many places the key can be in such that Chris cannot find the key?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The blue arrow shows the path of the penguin.
The area with the red crosses are the ones that are not accessible.