Dinesh Goyal's submission of Reverse Maximisation | CodeChef