Problem

Source: 2024 Mexican Mathematical Olympiad, Problem 6

Tags: combinatorics, Game Theory



Ana and Beto play on a blackboard where all integers from 1 to 2024 (inclusive) are written. On each turn, Ana chooses three numbers $a,b,c$ written on the board and then Beto erases them and writes one of the following numbers: $$a+b-c, a-b+c, ~\text{or}~ -a+b+c.$$The game ends when only two numbers are left on the board and Ana cannot play. If the sum of the final numbers is a multiple of 3, Beto wins. Otherwise, Ana wins. ¿Who has a winning strategy?