3. How many ways are there to cut a $10 \times 10$ square into several rectangles along the grid lines such that the sum of their perimeters is 398? Ways that can be matched by rotation or flipping are considered different.
Solution: 180 ways.

If the entire square is cut into 100 unit squares, the sum of the perimeters will be $4 \times 100=400$. Therefore, we need to reduce this sum by 2, which is achieved by keeping one internal partition intact (in other words, the square is cut into 98 squares and 1 domino). There are a total of 180 internal partitions - 9 in each of the 10 rows and 9 in each of the 10 columns.