# Task 5. Logic

Text of the task. On a new site for oil workers, five containers for the accommodation of five shift workers were installed in sequence. Each of them has a favorite movie/series, a favorite dish, and an area of interest that they pursue in their free time. Write down everything you can find out about the resident of the white container, if it is known:

- It is known that Ivan lives in the red container.
- The resident of the blue container is engaged in esports.
- Anna watches the series "Liquidity."
- The one who constantly eats cookies also watches "Doctor Zhivago."
- The one living in the yellow container prefers to drink kumis.
- The green container stands next to the one where they watch the movie "Papa."
- Damir cannot stand solyanka.
- The one who loves solitaire lives next to the one who is engaged in esports.
- In the green container, they watch the series "Bermuda Triangle."
- Anna's container stands immediately to the right of Diana's container.
- The lover of khinkali loves to create 3D models.
- Semen loves fruits very much.
- The first number marked is the white container.
- The neighbor of the lover of solyanka plays the flute with interest.
- The neighbor of the one who constantly eats fruits keeps a travel diary.
- Ivan lives between the green and blue containers.
- In the central container, they watch the series "The Three Musketeers."
Solution to the problem. The problem can be solved using tables. First, we will build an empty table with container numbers, and after reading the statements, we will fill in the cells whose information is directly indicated in the statements.

| Number | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Color | White |  |  |  |  |
| Name |  |  |  |  |  |
| Movie |  |  | Three Musketeers |  |  |
| Dish |  |  |  |  |  |
| Hobby |  |  |  |  |  |

Next, we match the statements:

- It is known that Ivan lives in a red container.
- Ivan lives between a green and a blue container.
- Anna watches the series "Liquidity".
- Anna's container is immediately to the right of Diana's container.

From this:

- Ivan lives in the third or fourth container.
- Anna lives in the second, fourth, or fifth container.

Let's assume that Ivan lives in the third container, the green container is to the left of it, and the blue container is to the right. If we encounter a contradiction during the solution, we will try another placement. We will use the statements:

- The green container is next to the one where they watch the movie "Papa".
- The resident of the blue container is engaged in esports.
- In the green container, they watch the series "Bermuda Triangle".
- The resident of the yellow container prefers to drink kumis.

| Number | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Color | White | Green | Red | Blue | Yellow |
| Name |  |  | Ivan | Diana | Anna |
| Movie | Papa | Bermuda Triangle | Three Musketeers |  | Liquidity |
| Dish |  |  |  |  | Kumis |
| Hobby |  |  |  | Esports |  |

This allows us to consider that Diana eats cookies and watches "Doctor Zhivago". We have not used the following statements:

- The lover of khinkali enjoys creating 3D models.
- The neighbor of the one who constantly eats fruits keeps a travel diary.
- The neighbor of the lover of solyanka plays the flute with interest.
- Damiir cannot stand solyanka.
- The one who loves solitaire lives next to the one who is engaged in esports.
- Semen loves fruits very much.

We can draw the following conclusions:

- Damiir does not like solyanka, so he prefers khinkali.
- Semen prefers fruits, so Ivan must prefer solyanka.
- The flute is played in the green container.
- Damiir lives in the white container.

The remaining statements will easily lead to the desired result:

| Number | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Color | White | Green | Red | Blue | Yellow |
| Name | Damiir | Semen | Ivan | Diana | Anna |
| Movie | Papa | Bermuda Triangle | Three Musketeers | Doctor Zhivago | Liquidity |
| Dish | Khinkali | Fruits | Solyanka | Cookies | Kumis |
| Hobby | 3D modeling | Flute | Travel diary | Esports | Solitaire |

Thus, in the white container, Damiir lives, he loves khinkali, often re-watches the movie "Papa," and is interested in 3D modeling.

It is possible that you found another solution that does not contradict the conditions. In the other options, problems of the same type are presented.