5. Three squirrels usually eat porridge for breakfast: semolina (M), buckwheat (B), oatmeal (O), and millet (R). No porridge is liked by all three squirrels, but for each pair of squirrels, there is at least one porridge that they both like. How many different tables can be made where each cell contains a plus (if it is liked) or a minus (if it is not liked)?

|  | M | B | O | R |
| :--- | :--- | :--- | :--- | :--- |
| Squirrel 1 |  |  |  |  |
| Squirrel 2 |  |  |  |  |
| Squirrel 3 |  |  |  |  |
Answer: 132.

Solution: If two different pairs like the same porridge, then the porridge is liked by three squirrels, violating the first condition. From three squirrels, three different pairs can be formed, and these three pairs like different porridges. There are 4 ways to choose these 3 porridges, and $3!=6$ ways to distribute 3 porridges among the three pairs. In total, there are 24 ways to distribute the porridges that the pairs like. The fourth porridge can have the following scenarios: 1) it is not liked by anyone, 2) it is liked by only one squirrel, 3) it is liked by only one pair.

In case 1), the total number of options remains 24. In case 2), the number 24 is multiplied by the number of ways to choose the squirrel who likes the fourth porridge, which is 3, resulting in 72. In case 3), the situation is as follows: there is a pair that likes two porridges, and two pairs that like two other porridges. The first two porridges can be chosen in $\frac{4 \cdot 3}{2}=6$ ways. The pair that likes the first two porridges can be chosen in three ways (since we choose one out of three). The two remaining porridges can be distributed among the two remaining pairs in two ways. In total, there are $6 \cdot 3 \cdot 2=36$ options in this case. Therefore, the total number of different tables can be $24+72+36=132$.

Comment: Correct solution - 20 points. Correct solution with computational errors - 15 points. Partial case considered - 5 points. Solution started but progress is insignificant - 1 point. Only the correct answer without a solution - 0 points.

## Variant 3