Bakayev E.v. $\quad$.
In each cell of a strip of length 100, there is a chip. For 1 ruble, you can swap any two adjacent
chips, and you can also swap any two chips that have exactly 4 chips between them for free. What is the minimum number of rubles needed to rearrange the chips in reverse order?
Let's number the chips and cells in order from 0 to 99. A free operation does not change the remainder of the cell number when divided by 5.

Evaluation. Let's mentally arrange the piles of chips in a circle. First, the pile of chips with a remainder of 0, then with 1, and so on up to 4. A paid operation swaps a pair of chips from adjacent piles. Chips from the zero pile must participate in at least one such swap to reach the fourth pile. Similarly for chips from the fourth pile. Chips from the first pile must participate in at least two swaps to reach the third pile. Similarly for the third pile. Therefore, at least \((20+20+40+40) / 2 = 60\) rubles are required. But if only 60 rubles are spent, the chips from the first pile will have to go through the second pile, so at least one chip from the second pile will participate in swaps. Consequently, more than 60 rubles are necessary.

Algorithm. Clearly, free operations can arrange the chips within a pile in any order.

Therefore, correctly arranging all chips from the zero and fourth piles can be done for 20 rubles. Consider the remaining three piles. Let's mentally leave only one chip \(A\) in the second pile. We will swap it with a chip from the first pile. Each time, we will move the chip that has come to the second pile further using a new chip. Then, for 40 rubles, we will move all chips from the first pile to the third, and from the third to the first, except for one: it will remain in the second pile, not reaching the first. We will swap it with \(A\), and all chips will be in the correct piles.

## Answer

For 61 rubles.