For the calculations, it is essential to determine in which fifth of the hall the segment $\mathrm{s}$ with free tickets ends (see image). Therefore, we will divide the solution into five parts and work with a different assumption for $\mathrm{s}$ in each. For the number of seats $\mathrm{v}$ in one fifth of the hall, we use the unknown $p$.

![](https://cdn.mathpix.com/cropped/2024_04_17_c7e802ccb04b770c89dfg-2.jpg?height=483&width=802&top_left_y=1472&top_left_x=661)

a) We assume that 150 free tickets constituted $\frac{1}{5}$ of the hall or less. By moving the free tickets to the back of the hall, 150 * 40 = 6000 (CZK) would be earned, which does not match the problem statement.

b) We assume that the segment with free tickets ends in the second fifth of the hall, i.e., that $p < 150 \leqq 2p$. By moving the free tickets from the first fifth to the fifth, 40p CZK would be earned. In the second fifth of the hall, there are $150 - p$ free tickets, and their move to the fourth fifth would earn $20 \cdot (150 - p)$ CZK. We calculate $p$:

$$
\begin{aligned}
40p + 20 \cdot (150 - p) & = 4320 \\
20p + 3000 & = 4320 \\
p & = 66.
\end{aligned}
$$

We see that the assumed inequality $150 \leqq 2p$ does not hold, so the segment with free tickets cannot end in the second fifth of the hall.

c) We assume that the segment with free tickets ends in the third fifth of the hall, i.e., that $2p < 150 \leqq 3p$. By moving the free tickets from the first fifth to the fifth, 40p CZK would be earned, from the second fifth to the fourth, 20p CZK. The remaining $150 - 2p$ free tickets are in the third fifth of the hall and would be moved without profit back to the third fifth. We calculate $p$:

$$
\begin{aligned}
40p + 20p + 0 \cdot (150 - 2p) & = 4320, \\
60p & = 4320, \\
p & = 72.
\end{aligned}
$$

We see that the assumed inequality $2p < 150 \leqq 3p$ holds. Therefore, the segment with free tickets could end in the third fifth of the hall, and the total number of seats in the hall would then be $5p = 5 \cdot 72 = 360$.

d) We assume that the segment with free tickets ends in the fourth fifth of the hall, i.e., that $3p < 150 \leqq 4p$. We can set up an equation similarly to the previous paragraphs or use another approach: 180p CZK was earned from tickets in the fifth fifth of the hall, and $4p - 150$ tickets were sold in the fourth fifth, earning $200 \cdot (4p - 150)$ CZK. If the free tickets were distributed from the back rows, $5p - 150$ tickets would be sold, all at 220 CZK. The difference between these two revenues is 4320 CZK, leading to the following equation:

$$
\begin{aligned}
220 \cdot (5p - 150) - 180p - 200 \cdot (4p - 150) & = 4320 \\
120p - 3000 & = 4320, \\
p & = 61.
\end{aligned}
$$

We see that the assumed inequality $3p < 150$ does not hold, so the segment with free tickets cannot end in the fourth fifth of the hall.

e) We assume that the segment with free tickets ended in the fifth fifth of the hall. We can proceed as in paragraphs b), c), and d) or use a simpler approach: money was earned only from seats in the fifth fifth, and if they were sold in the first fifth instead, 40 CZK more would be earned per ticket. The number of sold seats would then be $4320 : 40 = 108$, and the total number of seats would be $150 + 108 = 258$. However, the segment with 150 free tickets would not end in the last fifth of the hall, so the assumption at the beginning of this part of the solution cannot be fulfilled.

There were 360 seats in the hall.
Seats in the theater hall are divided into three categories based on their distance from the stage. "1st places" are closest to the stage, constitute two fifths of the hall's capacity, and are sold for 220 Kč. "2nd places" constitute the next two fifths of the hall and are sold for 200 Kč. The remaining "3rd places" are sold for 180 Kč. Before the start of the pre-sale for the grand premiere, 150 tickets were given away for free to invited guests. The tickets were distributed sequentially from the front of the hall to the back. All other tickets were then sold. If, however, the free tickets were distributed sequentially from the back of the hall to the front, the revenue would be 4320 Kč higher. How many seats were in the hall?

(L. Šimunek)