Problem

Source: 2016 Azerbaijan JBMO TST, D1 P4

Tags: combinatorics, games, winning strategy



There are three stacks of tokens on the table: the first contains $a,$ the second contains $b,$ and the third contains $c$ where $a \ge b \ge c.$ Players $A$ and $B$ take turns playing a game of swapping tokens. $A$ starts first. On each turn, the player who gets his turn chooses two stacks, then takes at least one token from the stack with the lowest number of tokens and places them on the stack with the highest number of tokens. If the number of tokens in the two piles he/she chooses is equal, then he/she takes at least one token from any of them and puts it in the other. If only one pile remains after a player's move, that player is considered a winner. At what values of $a, b, c$ who has the winning strategy ($A$ or $B$)?