Problem

Source: Tournament of Towns, Junior A-Level , Spring 2019 p7

Tags: game, combinatorics, game strategy



There are $100$ piles of $400$ stones each. At every move, Pete chooses two piles, removes one stone from each of them, and is awarded the number of points, equal to the non- negative difference between the numbers of stones in two new piles. Pete has to remove all stones. What is the greatest total score Pete can get, if his initial score is $0$? (Maxim Didin)