Mahou DB (Lok Huang)
Eight Queens (Laurence Liu)
Dairy Queen, an ice-cream chain, is starting 8 stores in a small town with 8x8 streets. They require:
- Every store is at the intersection of two streets
- Every two stores are not on the same street
- Walking distance (along the streets) between every two stores should be at least 4 blocks
How many possible ways do they have to place the 8 stores?
Given a maze, determine if there is a path from the letter U
to the outside.
Sample input:
......
..**..
.*U.*.
..**..
......
Sample output:
no
Sample input:
********
*...*..*
*.*....*
*.***.**
*.U.*...
********
Sample output:
yes