http://forums.sdn.sap.com/thread.jspa?threadID=1926179&tstart=0
On a 8*8 chess board, there is a queen. On each turn, the queen moves N steps at a fixed direction. When hitting the edge, the direction is changed to the reflected one. When hitting the corner, the direction is changed to the reversed one. And after each M turns, the direction rotates 45 degree clockwisely. You don't know the original position, direction, N and M. On each turn, you can check a single square on the chess board. How many turns do you need to be sure to find the queen?