posted by urgent answer needed .
A dog is standing at the bottom left corner of a grid of 46×46 streets. The dog is trying to get to the top right corner of the grid, where it knows there is some food. As the dog runs, between the corners, it will only ever run up and to the right. Any time the dog runs to the right, it runs at least 4 consecutive blocks to the right, and any time it runs up, it runs at least 12 consecutive blocks up. How many different intersections are unreachable for the dog by following these rules?
Details and assumptions
The last stretch that the dog runs must also satisfy the condition on the minimum number of consecutive blocks.
An intersection is reachable if the dog runs through it. It doesn't matter if the dog can change direction at that intersection.
All of them.
Since there are 46x46 streets, there are 45x45 blocks.
The dog has to run 4 blocks in a row in the horizontal direction, and 12 blocks in a row in the vertical direction, both of which are even numbers, it will never reach the food, in which direction it tries.
then wats the answer
I guess I did not interpret the question correctly the first time around.
"At least 4 blocks" means that the 2nd, 3rd, 4th streets (north-south) are not accessible.
Similarly, the 2nd to the 12th avenues (east-west) are not accessible.
So near the starting point there are 46×11 intersections not accessible, in addition to the 2nd, 3rd and 4th streets of the first avenue,
for a total of
Similarly, for the end point (top-right), the same number applies.
The total number of inaccessible intersections is therefore 2×509=1018.