Ivan's submission of Reverse Maximisation | CodeChef