Three piles of stones are given, initially containing 2000, 4000, and 4899 stones respectively. Ali and Baba play the following game, taking turns, with Ali starting first. In one move, a player can choose two piles and transfer some stones from one pile to the other, provided that at the end of the move, the pile from which the stones are moved has no fewer stones than the pile to which the stones are moved. The player who cannot make a move loses. Does either player have a winning strategy, and if so, who?
Problem
Source: XIII International Festival of Young Mathematicians Sozopol 2024, Theme for 10-12 grade
Tags: combinatorics