You live in a 2-dimensional plane, and one of your favourite places to visit is the Hall of Mirrors. The Hall of Mirrors is a room (a 2-dimensional room, of course) that is laid out in a grid. Every square on the grid contains either a square mirror, empty space, or you. You have width 0 and height 0, and you are located in the exact centre of your grid square.
Despite being very small, you can see your reflection when it is reflected back to you exactly. For example, consider the following layout, where?
'#'?indicates a square mirror that completely fills its square,?
'.'?indicates empty space, and the capital letter?
'X'indicates you are in the center of that square:
###### #..X.# #.#..# #...## ######
If you look straight up or straight to the right, you will be able to see your reflection.
Unfortunately in the Hall of Mirrors it is very foggy, so you can’t see further than?D?units away. Suppose?D=3. If you look up, your reflection will be 1 unit away (0.5 to the mirror, and 0.5 back). If you look right, your reflection will be 3 units away (1.5 to the mirror, and 1.5 back), and you will be able to see it. If you look down, your reflection will be 5 units away and you won’t be able to see it. 阅读全文 ……