# Majority Vote of Three Advisers

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Task 6 of the school stage of the All-Russian School Olympiad (VsOSh) 2025/26 in artificial intelligence (region group II), grades 9–11. The official answer and solution are in a separate file.*

The Heir Tutti is capricious: when the royal cook brings him a dish, he either agrees to try it (let us denote this answer by 1) or refuses (0). Before each attempt, the three Fat Men look at the dish and give their opinion on whether the heir will like it.

The tech-savvy royal cook keeps a table (the file can be downloaded in one of the formats XLSX, ODS, CSV). Each row contains four integers, each equal to 0 or 1:

$$n_1,\ n_2,\ n_3 \text{ — the opinions of the three Fat Men}, \qquad y \text{ — Tutti's actual decision}.$$

Based on the Fat Men's opinions, the cook uses the majority rule to make a guess $\hat{y}$ about whether the dish will be tried:

$$\hat{y} = \begin{cases} 1, & \text{if } n_1 + n_2 + n_3 \ge 2, \\ 0, & \text{otherwise.} \end{cases}$$

The cook wrote the values of $\hat{y}$ in a separate column, but accidentally erased the data and is now trying to restore them.

**Problem.** In how many rows did the cook's guess $\hat{y}$ coincide with the heir's decision $y$?

**Scoring criterion:** exact match of the numerical answer — 12 points

**Maximum score for the task — 12**
