Problem

Source: Caucasus MO 2023

Tags: combinatorics



Sasha has $10$ cards with numbers $1, 2, 4, 8,\ldots, 512$. He writes the number $0$ on the board and invites Dima to play a game. Dima tells the integer $0 < p < 10, p$ can vary from round to round. Sasha chooses $p$ cards before which he puts a “$+$” sign, and before the other cards he puts a “$-$" sign. The obtained number is calculated and added to the number on the board. Find the greatest absolute value of the number on the board Dima can get on the board after several rounds regardless Sasha’s moves.