You are hunting for treasure located at some point on an infinite square grid. You have two tools: a pointer, which points toward the treasure; and a shovel, which you can use to dig for it. Here's the catch: both tools are imperfect. The pointer might point toward the treasure or it might be off by up to 60 degrees. And the shovel will break if you try to dig in five different places.
Can you find the treasure?
- The treasure is guaranteed to be at a point of the grid.
- You can use the pointer from any point of the grid.
- If you use the pointer while you are standing on top of the treasure it can point in any direction. Otherwise it will point in a direction within 60 degrees of the direction to the treasure.
- You can only find the treasure by digging it up with the shovel, and you can only use the shovel four times.