# Cat or Dog Threshold

*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 1 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.*

When analysing a photo, a model outputs a real number $x$. Based on it, the model decides whether the photo shows a cat or a dog, using the following algorithm.

1. First, a score is computed:
   $$L(x) = 2x^5 + 3x^4 - 5x^3 - 5x^2 + 3x + 2 = (x - 1)^2 (x + 1)(x + 2)(2x + 1).$$
2. This score is then converted into the probability of finding a cat in the photo:
   $$\mathbb{P}(\text{cat} \mid x) = \frac{1}{1 + 2^{-L(x)}}.$$
3. Next, the probability of finding a dog in the photo is obtained from it:
   $$\mathbb{P}(\text{dog} \mid x) = 1 - \mathbb{P}(\text{cat} \mid x).$$

Find the largest integer $x$ for which $\mathbb{P}(\text{dog} \mid x) > 0.5$.

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

**Maximum score for the task — 12**
