5. In a magical coffee shop, 55 creatures met: elves and dwarves. Each ordered either a cup of tea or a cup of coffee. All elves tell the truth when drinking tea and lie when drinking coffee, while all dwarves do the opposite. When asked, "Are you drinking tea?" 44 of those present answered "yes," and when asked, "Are you a dwarf?" 33 answered "yes." In reality - how many of those present were drinking tea and how many were dwarves? Please explain your answer.
# Solution.

Let's see how gnomes and elves would answer the questions and create the corresponding table,

|  | "Are you drinking tea?" | "Are you a gnome?" |
| :---: | :---: | :---: |
| Elf drinking tea | yes | no |
| Elf drinking coffee | yes | yes |
| Gnome drinking tea | no | no |
| Gnome drinking coffee | no | yes |

From the table, we can see that all elves will answer "Yes" to the first question, while all gnomes will answer "No." Therefore, there are 44 elves, and thus $55 - 44 = 11$ gnomes. On the second question, "Yes" will be answered by those drinking coffee, and "No" by those drinking tea. Therefore, 33 beings drink coffee, and thus $55 - 33 = 22$ beings drink tea.

Answer. In reality, 22 beings drink tea and 11 of the gathered beings are gnomes. Grading criteria.

Full solution - 7 points.

An answer to only one question (i.e., only the number of gnomes or only the number of tea drinkers) with full justification - 3 points.

The number of coffee drinkers and the number of elves were found (with justification), but no further progress was made (i.e., did not subtract the found numbers from 55) - 3 points.

Only the correct answer without justification (possibly with a check on a specific example that everything adds up) - 2 points.

All-Russian School Olympiad in Mathematics 2015-2016 academic year.

School stage. 7th grade