Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2014 Question 38

Math Olympiad Vault · MathNet 2014

Question 38

A safe contains $n$ boxes numbered from $1$ to $n$. Each box initially contained a card with the number of this box on it. Then Basil rearranged the cards so that the $i$th box now contains a card with number $a_i$. Pete may switch any two cards with numbers $x$ and $y$; for such an operation he should pay $2|x - y|$ roubles. Prove that he may return all the cards into their initial boxes for the price of at most $|a_1 - 1| + |a_2 - 2| + \dots + |a_n - n|$ roubles.