A spider web has the form of a grid of $100 \times 100$ nodes (in other words, it is a grid of 99×99 cells). In one of its corners sits a spider, and in some 100 nodes, flies are stuck to the web. In one move, the spider can move to any adjacent node. Can the spider guarantee to eat all the flies, spending no more than

a) 2100 moves;

b) 2000 moves?
b) Let's divide the grid into 10 horizontal strips, each with 1000 nodes ($9 \times 99$ cells). Suppose the spider is sitting in the bottom-left corner. Initially, it moves from left to right along the bottom edge of the lower strip until it sees a fly stuck in the same strip above it. Then it crosses the strip vertically, eats the fly, and continues moving to the right along the top edge of the strip until it sees a fly stuck below it. Then it moves back to the bottom edge of the strip and so on. Upon reaching the right edge of the strip, it moves vertically to the bottom edge of the next strip. In total, it will take no more than $99 + 9k + 10$ moves, where $k$ is the number of flies in the first strip. Then he repeats the "procedure," moving from right to left along the second strip, and so on. To eliminate all 100 flies, it will take no more than $10 \cdot 99 + 9 \cdot 100 + 9 \cdot 10 = 1980$ moves.

## Answer

It can.